Forked from orenyomtov/update-gcc-clang-8-ubuntu-16.04-xenial.sh
Last active
August 19, 2021 01:37
-
-
Save dzid26/129585d1170fb105a874309f7809241a to your computer and use it in GitHub Desktop.
Update clang to 12 and gcc to 8 and qt5.11.1 on Ubuntu xenial 16.04
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
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/clang-12 ]; 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-12 main" | |
sudo apt-get update | |
sudo apt-get install -y clang-12 | |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 1000 | |
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 1000 | |
fi | |
sudo add-apt-repository ppa:beineri/opt-qt-5.11.1-xenial | |
sudo apt update | |
sudo apt install qt511-meta-full | |
mkdir ~/.config/qtchooser | |
echo "/opt/qt511/bin" > ~/.config/qtchooser/default.conf | |
echo "/opt/qt511/lib" >> ~/.config/qtchooser/default.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment