Created
June 10, 2018 08:24
-
-
Save nocachy/efd351ee450d7f53efa6c6652c0691c5 to your computer and use it in GitHub Desktop.
Latest GCC installation commands script(test with Ubuntu 14.04.5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get update && \ | |
| sudo apt-get install build-essential software-properties-common -y && \ | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ | |
| sudo apt-get update && \ | |
| sudo apt-get install gcc-snapshot -y && \ | |
| sudo apt-get update && \ | |
| sudo apt-get install gcc-6 g++-6 -y && \ | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \ | |
| sudo apt-get install gcc-4.8 g++-4.8 -y && \ | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8; | |
| //When completed, you must change to the gcc you want to work with by default. Type in your terminal: | |
| sudo update-alternatives --config gcc | |
| //To verify if it worked. Just type in your terminal | |
| gcc -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment