Saturday, 18 April 2015

Installing/Upgrading GCC G++ 4.9 in Ubuntu/Linux Mint Machine

GCC GNU Compiler Collection is an open source command-line software designed to act as a compiler for GNU/Linux and BSD-based operating systems. It includes front-ends for numerous programming languages, including C, C++, Objective-C, Fortran, Java, Ada, and Go, as well as libraries for these languages.

With GCC you can configure, compile and install GNU/Linux applications in Linux or BSD operating systems using only the source archive of the respective program. However, users don’t need to interact with the compiler, as this is done automatically by the configure and make scripts.

The latest update GCC 4.9.1 is a bug-fix release from the GCC 4.9 branch containing important fixes for regressions and serious bugs in GCC 4.9.0 with more than 88 bugs fixed since the previous release. In addition to that, GCC 4.9.1 release supports OpenMP 4.0 also in Fortran, rather than just in C and C++

Installing GCC 4.9

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

sudo apt-get update

sudo apt-get install gcc-4.9 g++-4.9

Once installed, run following commands one by one to use gcc 4.8 instead of previous version.

sudo update-alternatives --remove-all gcc 

sudo update-alternatives --remove-all g++

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20

sudo update-alternatives --config gcc

sudo update-alternatives --config g++

Now you can check the current version of gcc in your machine by giving the command

gcc --version


  1. I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts.
    Cyber Security Projects for Final Year

    JavaScript Training in Chennai

    Project Centers in Chennai

    JavaScript Training in Chennai

  2. I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. Techno-based information has been fetched in each of your topics. Sure it will enhance and fill the queries of the public needs. Feeling so glad about your article. Thanks…!
    selenium training in chennai
    selenium online courses best selenium online training
    selenium testing training
    selenium classes

  3. There are many applications in which you need fasteners that are quick, convenient, and rapid fire. When you are facing such construction projects as subflooring, pallet manufacturing, roofing, upholstery, wiring, carpet installation, wall sheathing or any number of other projects or work requirements, you may want to consider a staple gun to make your fastening jobs quick, convenient, and dependable. A staple gun delivers hefty, metal staples into a variety of materials, including plastic, wood, or masonry.torque wrench

  4. Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon.

  5. There are many applications in which you need fasteners that are quick, convenient, and rapid fire. When you are facing such construction projects as subflooring.keep share some more details..
    AngularJS training in chennai | AngularJS training in anna nagar | AngularJS training in omr | AngularJS training in porur | AngularJS training in tambaram | AngularJS training in velachery