Skip to content

Instantly share code, notes, and snippets.

@craigminihan
Last active February 9, 2018 05:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigminihan/229b0ee9dcf4ab6d794c4c8ee1f0d92e to your computer and use it in GitHub Desktop.
Save craigminihan/229b0ee9dcf4ab6d794c4c8ee1f0d92e to your computer and use it in GitHub Desktop.
Install GCC-4.9 and LLVM/Clang-3.6 on Ubuntu 12 a bit like Travis CI
# replace your local package mirror if it is borked
#apt-get clean
#sed -i 's/http\:\/\/..\.archive\./http:\/\/us.archive./g' /etc/apt/sources.list
apt-get update
# add launchpad's ppa to apt
apt-get install -y python-software-properties
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
# add llvm to apt
echo -e "deb http://apt.llvm.org/precise/ llvm-toolchain-precise main\n" \
"deb-src http://apt.llvm.org/precise/ llvm-toolchain-precise main\n" >> /etc/apt/sources.list
# add llvm 3.6 to apt
echo -e "# 3.6\n" \
"deb http://apt.llvm.org/precise/ llvm-toolchain-precise-3.6 main\n" \
"deb-src http://apt.llvm.org/precise/ llvm-toolchain-precise-3.6 main\n" >> /etc/apt/sources.list
# add llvm's key to apt
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
# update apt with all the new llvm stuff
apt-get update
# install some basic dev bits
apt-get install -y curl wget unzip bzip2 pkg-config zlib1g-dev
apt-get install -y make autoconf automake libtool git
apt-get install -y ccache
# install GCC 4.9
apt-get install -y g++-4.9 gcc-4.9
# get clang 3.6
apt-get install -y clang-3.6 clang++-3.6
@craigminihan
Copy link
Author

Run the script on a clean Ubuntu 12 system as root.

@Rafoula
Copy link

Rafoula commented Sep 18, 2017

@craigminihan I follow these commands but how to check I have it?

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