
Whatever the gcc package aliases to: and also present in manifests: How do I list the default installed packages? This is due to the change in GCC's version scheme, where 5.1 is the first GCC 5 release, and future 5.X releases are for bug fixes. NOTE: You could skip installing the PPA Repository and just use /usr/bin/gcc-4.9-base but I prefer using the fresh updated toolchains.įor GCC 5.X or 6, the packages (and correspondingly, the commands) are just called gcc-5, gcc-6, etc.

Or: sudo update-alternatives -remove-all gcc If you have an issue with update-alternatives gcc priority 60 not being higher than previous versions installed you can use the previous update-alternatives -config gcc command to check installed versions and use: sudo update-alternatives -remove gcc Then you can check which one that is set, and change back and forth using: sudo update-alternatives -config gcc Sudo update-alternatives -install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 -slave /usr/bin/g++ g++ /usr/bin/g++-4.8 But, at this point gcc-4.9 will be your only version configured in update-alternatives, so add 4.8 to update-alternatives, so there actually is an alternative, by using: sudo apt-get install gcc-4.8 g++-4.8

The -slave, with g++, will cause g++ to be switched along with gcc, to the same version. Sudo update-alternatives -install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 -slave /usr/bin/g++ g++ /usr/bin/g++-4.9

The best way to correctly install gcc-4.9 and set it as your default gcc version use: sudo add-apt-repository ppa:ubuntu-toolchain-r/test
