Thank you for asking this question, it helped me a lot to recall all the stuff regarding Ubuntu.If you simply install GCC 4.9.0 in Ubuntu 14.04 definitely it will get install by using following lines of command but still system will not set it as your default compiler.Now after this you can check which version of GCC is your default compiler by writing this command -v When I executed this command, GCC 4.8.4 was shown as a default compiler. After executing all the above commands sequentially, GCC 4.9 will get set as a default compiler, but do not forget to replace 4.3 with 4.8 and 4.4 with 4.9.

The next section gives a quick primer into GCC upgrades (and how easy they are).

Please refer to the troubleshooting section for some commonly reported issues.

If you want to read the lengthy reasoning behind GCC upgrades, please continue with GCC Upgrading Explained.

If you are upgrading GCC then you do not need to do anything except switch compiler version and rebuild libtool: There you go. GCC upgrading has always been mystified, with suggestions ranging from "You do not need to do anything" up to "You will need to rebuild your entire system twice".

sudo apt-get update sudo apt-get install gcc-4.6 sudo apt-get install g++-4.6 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20 sudo update-alternatives --config gcc sudo update-alternatives --config g++ is the general procedure.

Read the options in the configure script..have to have a version installed to compile a new one.make install will probably mangle your current install.suggestion: if you want "newest" then use "newest" - that's 11.10 at this point I think.Most of this FUD comes from the confusion surrounding ABI incompatibility. Some time ago, the execution of this command has been integrated in the package deployments itself (through the toolchain eclass) so there is no need for users to call this themselves anymore.The reason we need to rebuild libtool after the upgrade of versions is because of its main purpose: libtool is a toolset that aggregates platform-specific code in a generic interface, allowing applications to build against shared libraries without needing to deal with the platform specific aspects of shared libraries.To fulfill its function properly, the version information in them.