How To Install GCC 4.8.1 On Ubuntu, Linux Mint And Elementary OS Via PPA

Hello Linux Geeksters. As you may know it is very important to have the compilers from the system up to date, in order to successfully build applications from sources. GCC, the GNU Compiler Collection is a package that includes C, C++, Objective-C, Fortran, Java, Ada compilers.

In this article I will show you how to install GCC 4.8.1 on Ubuntu 13.10 Saucy Salamander, Ubuntu 13.04 Raring Ringtail, Ubuntu 12.10 Quantal Quetzal, Ubuntu 12.04 Precise Pangolin, Ubuntu 10.04 Lucid Lynx, Linux Mint 16 Petra, Linux Mint 15 Olivia, Linux Mint 14 Nadia, Linux Mint 13 Maya and Elementary OS 0.2 Luna.

Because it is available via PPA, installign GCC 4.8.1  on Ubuntu, Linux Mint and Elementary OS is easy. All you have to do is:

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install install gcc-4.8

After GCC 4.8.1 have been successfully installed, you need to do the following:

Remove the previous gcc and g++ versions from the default applications list:

$ sudo update-alternatives --remove-all gcc

Make GCC 4.8.1  the default compiler on the system:

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
$ sudo update-alternatives --config gcc

Liked it? Take a second to support Geekster on Patreon!
Tagged with: , , , , , , , , , , , , , , , , , ,
Posted in The Linux and Unix Articles!
4 comments on “How To Install GCC 4.8.1 On Ubuntu, Linux Mint And Elementary OS Via PPA
  1. Herbert Trip says:

    Thank you great help clear instructions.

  2. someone says:

    Thanks!

  3. nicolas says:

    thank you !

  4. Seba says:

    thank you!! very clear and easy instructions!!!

Leave a Reply to someone Cancel reply

Your email address will not be published. Required fields are marked *

*

Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!