6

I need to install Clang 4.0 and Clang++ 4.0 on my Ubuntu 14.04 box. The most recent version I can find in the apt-get package list is 3.5. How do I install 4.0?

Robert Oschler
  • 311
  • 6
  • 21

1 Answers1

7

I believe you can do it this way:

sudo apt-add-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main"
sudo apt-get update
sudo apt-get install clang-4.0 lldb-4.0

This is based on the answer provided here updated to reflect the repositories found here.

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
  • To install latest stable in 2020 - `sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"` – brokenfoot Jan 19 '20 at 16:19
  • @brokenfoot This is decent info. But since this answer is 3+ years old, might be best if you expand your comment to an answer. Please be sure to include the version of Ubuntu in your answer when you post it. – Giacomo1968 Jan 19 '20 at 21:22