Ubuntu – How to update gcc to the latest version in Ubuntu 10.04

gccinstallationUbuntuupgrade

I have Ubuntu 10.04 32-bit with gcc 4.4.3 currently installed on it. I want to upgrade it to gcc 4.6.1.

  1. How to update using Ubuntu Package Manager:

    apt-get upgrade/install
    
  2. As a second option I downloaded the latest gcc snapshot file from:

    http://gcc.cybermirror.org/snapshots/LATEST-4.7/gcc-4.7-20110709.tar.bz2

How do I configure, compile, and install it?

Best Answer

I think you can get it by adding this PPA to your repositories:

https://launchpad.net/~ubuntu-toolchain-r/+archive/test

You can add the PPA by running

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

After it's in the repositories (and after running apt-get update) you should be able to either 1) update to the latest version using apt-get upgrade, or possibly 2) you'll have it available as a separate package you need to you'll need to apt-get install. I'm not sure which is the case with this package.

Further information: Guide on how to add a PPA to your repositories.

Related Question