Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save orenyomtov/7dc59d121d8405f710711e6008cfa1bb to your computer and use it in GitHub Desktop.
Save orenyomtov/7dc59d121d8405f710711e6008cfa1bb to your computer and use it in GitHub Desktop.
Update clang to 8.0 and gcc to 8.0 on Ubuntu xenial 16.04
if [ ! -f /usr/bin/gcc-8 ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-8 g++-8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 1000
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 1000
fi
if [ ! -f /usr/bin/gcc-8 ]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository -y "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main"
sudo apt-get update
sudo apt-get install -y clang-8
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 1000
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 1000
fi
@dzid26
Copy link

dzid26 commented Aug 19, 2021

line 10 should be: if [ ! -f /usr/bin/clang-8 ]; then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment