Last active
June 30, 2024 11:38
-
-
Save zuyu/7d5682a5c75282c596449758d21db5ed to your computer and use it in GitHub Desktop.
Install gcc 6 on 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 update && \ | |
sudo apt install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ | |
sudo apt update && \ | |
sudo apt 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 && \ | |
gcc -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for those who encounter the error:
consider adding
[trusted=yes]
:After that, I can install them successfully~