Created
September 28, 2020 17:13
-
-
Save rebornplusplus/424256a7d025ad17b26cd9b5055704c7 to your computer and use it in GitHub Desktop.
Install g++-8 in Ubuntu
This file contains 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 install -y software-properties-common | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt update | |
sudo apt install g++-8 -y | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 \ | |
--slave /usr/bin/g++ g++ /usr/bin/g++-8 \ | |
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-8 \ | |
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-8 \ | |
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-8 | |
sudo update-alternatives --config gcc | |
# Check gcc, g++ version | |
gcc --version | |
g++ --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment