864713 files and directories currently installed.) The following additional packages will be installed:ġ upgraded, 0 newly installed, 0 to remove and 84 not upgraded.Īfter this operation, 10.2 kB disk space will be freed. Software-properties-common set to manually installed. Software-properties-common is already the newest version (0.96.20.10). N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository ' stable InRelease' doesn't support architecture 'i386'īuild-essential is already the newest version (12.1ubuntu2). N: See apt-secure(8) manpage for repository creation and user configuration details. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. W: The repository ' stable InRelease' is not signed. W: GPG error: stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78BD65473CB3BD13 Sudo apt-get install gcc-4.8 g++-4.8 -y &
Sudo update-alternatives -install /usr/bin/gcc gcc /usr/bin/gcc-6 60 -slave /usr/bin/g++ g++ /usr/bin/g++-6 & Sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y & Sudo apt-get install build-essential software-properties-common -y & See my blog post at sudo apt-get update & \
If everything went fine you should see gcc 6.1.1 by the time I am writing this gist When completed, you must change to the gcc you want to work with by default. Sudo update-alternatives -install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 -slave /usr/bin/g++ g++ /usr/bin/g++-4.8 Sudo update-alternatives -install /usr/bin/gcc gcc /usr/bin/gcc-6 60 -slave /usr/bin/g++ g++ /usr/bin/g++-6 & \ Sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y & \ Sudo apt-get install build-essential software-properties-common -y & \ If you are still reading let's carry on with the code. To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. These commands are based on a askubuntu answer