15

I've tried the following obvious commands:

sudo apt-get update
sudo apt-get install clang-3.8

but I get the message:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and I've tried:

sudo apt-get update
sudo aptitude install clang-3.8

but get the message:

Couldn't find package "clang-3.8".  However, the following
packages contain "clang-3.8" in their name:
  clang-3.8-doc 
Couldn't find package "clang-3.8".  However, the following
packages contain "clang-3.8" in their name:
  clang-3.8-doc 
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Hoping for a version of clang more recent than 3.5. Any suggestions?

  • can you please edit your question and include the output of apt-cache search clang – Wayne_Yux Feb 16 '16 at 16:21
24

Looks like the latest version for 14.04.3 is clang 3.6 in Trusty Updates. But the developers maintain a PPA which should get you the latest version:

LLVM Debian/Ubuntu nightly packages

To install 3.8 you would first add the key:

wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -

and then add the repository for 3.8 by adding the following line manually to /etc/apt/sources.list (or using the gui 'Software & Updates'):

deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main

Screenshot here to demonstrate the technique:

enter image description here

Then run the following:

sudo apt-get update
sudo apt-get install clang-3.8 lldb-3.8

Test the installation as follows:

andrew@corinth:~$ clang-3.8 --version
clang version 3.8.0-svn262614-1~exp1 (branches/release_38)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
andrew@corinth:~$ 

And hopefully this will get you going...

  • As you can see at llvm.org/apt/trusty/dists only up to version 3.7 is available this way – Kyle McCormick Feb 18 '16 at 5:03
  • Indeed, leave it with me and I shall approach the page owner. Hate to give bad advice so I will most definitely chase this down... – andrew.46 Feb 18 '16 at 8:12
  • 1
    OK I have emailed Sylvestre and hopefully this issue can be resolved. – andrew.46 Feb 18 '16 at 11:33
  • No answer yet :( – andrew.46 Feb 23 '16 at 0:58
  • 6
    Wow, this is a new paradigm in Q&A, you first give an answer, and then make that answer come true :) – enobayram May 16 '16 at 4:17

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.