I have gcc 4.6.3 installed:
gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
I have installed newer version:
apt-get install gcc-4.7
But i still get result "gcc 4.6.3" when I type gcc --version
. How to fix it?
I am using ubuntu 12.04 and i have done
sudo apt-get update
sudo apt-get upgrade
Best Answer
This is because you have both versions installed, with 4.6 being treated as the default one.
You can explicitly choose which one to use.
The easiest way make
gcc-4.7
the defaultgcc
is to move the symlink of/usr/bin/gcc
: