Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
if I try 4.8.2 it cannot find it/ error occurs, please post that error. –  Avinash Raj Apr 16 at 15:44
    
And also post the output of apt-cache policy gcc on your question. –  Avinash Raj Apr 16 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 at 15:51
    
Try gcc-4.8 -v, you need to be explicit –  Jorge Castro Apr 16 at 15:51
    
@user21839 Please put that information in your question not in the comments! –  Jorge Castro Apr 16 at 15:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.