Updating gcc ubuntu

Rated 4.68/5 based on 552 customer reviews

I have installed gcc-3.3/g -3.3 on ubuntu 11.04 which already has gcc/g -4.4.

[email protected]:~# update-alternatives --config gcc update-alternatives: error: no alternatives for gcc.It is used to maintain different versions of the same software on a system.In your case, you will be able to use several declinations of apt-get install g -4.5 update-alternatives --install /usr/bin/g g /usr/bin/g -4.6 100 update-alternatives --install /usr/bin/g g /usr/bin/g -4.5 50 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 100 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.5 50 update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 100 update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.5 50 update-alternatives --set g /usr/bin/g -4.5 update-alternatives --set gcc /usr/bin/gcc-4.5 update-alternatives --set cpp-bin /usr/bin/cpp-4.5 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g g /usr/bin/g -4.6 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g g /usr/bin/g -4.7 sudo update-alternatives --config gcc root$ VER=4.6 ; PRIO=60 root$ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$VER $PRIO --slave /usr/bin/g g /usr/bin/g -$VER root$ update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-$VER $PRIO root$ VER=4.9 ; PRIO=40 root$ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$VER $PRIO --slave /usr/bin/g g /usr/bin/g -$VER root$ update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-$VER $PRIO update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 \ 10 \ --slave /usr/bin/cc cc /usr/bin/gcc-4.8 \ --slave /usr/bin/c c /usr/bin/g -4.8 \ --slave /usr/bin/g g /usr/bin/g -4.8 \ --slave /usr/bin/gcov gcov /usr/bin/gcov-4.8 \ --slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-4.8 \ --slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-4.8 \ --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-4.8 \ --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-4.8 \ --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-4.8 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 \ 15 \ --slave /usr/bin/cc cc /usr/bin/gcc-6 \ --slave /usr/bin/c c /usr/bin/g -6 \ --slave /usr/bin/g g /usr/bin/g -6 \ --slave /usr/bin/gcov gcov /usr/bin/gcov-6 \ --slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-6 \ --slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-6 \ --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-6 \ --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-6 \ --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-6 In case you want a quicker (but still very clean) way of achieving it for a personal purpose (for instance if you want to build a specific project having some strong requirements concerning the version of the compiler), just follow the following steps: where /usr/lib/llvm-3.7/bin is a directory that got created by the llvm-3.7 package, and which contains all the tools with their non-suffixed names.If you previously installed the Ubuntu Bash environment, just open the Microsoft Store, search for “Ubuntu”, and install it to get the latest version.It’ll show you whether you’re running Ubuntu 14.04 or Ubuntu 16.04.

Leave a Reply