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?

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.

2
  • 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. Jan 19 '20 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.