1

I'm trying to update to gcc 4.8.2. I have Ubuntu 12.04.

after this if I type gcc -v it says gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Next I typed

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

Then I try to check the gcc version by typing gcc -v it says that my version didn't change and I still have gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

After typing gcc-4.8 -v I get 4.8 as the following:

gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)

Now my question turns into why isn't it finding gcc 4.8.2? How can I set it to use gcc 4.8 as the default when I use gcc -v?

11
  • if I try 4.8.2 it cannot find it/ error occurs, please post that error. Apr 16, 2014 at 15:44
  • And also post the output of apt-cache policy gcc on your question. Apr 16, 2014 at 15:45
  • ubuntu@ubuntu-VirtualBox:~$ apt-cache policy gcc gcc: Installed: 4:4.6.3-1ubuntu5 Candidate: 4:4.6.3-1ubuntu5 Version table: *** 4:4.6.3-1ubuntu5 0 500 us.archive.ubuntu.com/ubuntu precise/main i386 Packages 100 /var/lib/dpkg/status ubuntu@ubuntu-VirtualBox:~$
    – user21839
    Apr 16, 2014 at 15:51
  • Try gcc-4.8 -v, you need to be explicit Apr 16, 2014 at 15:51
  • @user21839 Please put that information in your question not in the comments! Apr 16, 2014 at 15:52

0

You must log in to answer this question.

Browse other questions tagged .