8

here I have found instruction how to install clang3.8: http://llvm.org/apt/

so I executed:

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

result:

    --2015-09-19 12:53:09--  http://llvm.org/apt/llvm-snapshot.gpg.key
    Resolving llvm.org (llvm.org)... [sudo] password for user: 192.17.58.186
    Connecting to llvm.org (llvm.org)|192.17.58.186|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 3145 (3,1K) [application/pgp-keys]
    Saving to: ‘STDOUT’

    100%[======================================>] 3.145       --.-K/s   in 0,002s  

    2015-09-19 12:53:10 (1,87 MB/s) - written to stdout [3145/3145]
OK

and then:

sudo apt-get install clang-3.8 clang-3.8-doc libclang-common-3.8-dev libclang-3.8-dev libclang1-3.8 libclang1-3.8-dbg libllvm-3.8-ocaml-dev libllvm3.8 libllvm3.8-dbg lldb-3.8 llvm-3.8 llvm-3.8-dev llvm-3.8-doc llvm-3.8-examples llvm-3.8-runtime clang-modernize-3.8 clang-format-3.8 python-clang-3.8 lldb-3.8-dev liblldb-3.8-dbg

but I get:

E: Unable to locate package clang-3.8
E: Couldn't find any package by regex 'clang-3.8'
E: Unable to locate package clang-3.8-doc
E: Couldn't find any package by regex 'clang-3.8-doc'
E: Unable to locate package libclang-common-3.8-dev
E: Couldn't find any package by regex 'libclang-common-3.8-dev'
E: Unable to locate package libclang-3.8-dev
E: Couldn't find any package by regex 'libclang-3.8-dev'
E: Unable to locate package libclang1-3.8
E: Couldn't find any package by regex 'libclang1-3.8'
E: Unable to locate package libclang1-3.8-dbg
E: Couldn't find any package by regex 'libclang1-3.8-dbg'
...........................

My OS is Linux Mint 17 3.13.0-24-generic #47-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

Why apt-get cannot find those packages?

bataliero1234
  • 81
  • 1
  • 1
  • 3
  • 3
    Did you add LLVM's repository definition line(s) to `/etc/apt/sources.list` or as file in `/etc/apt/sources.list.d/$somefilename.list`? –  Sep 19 '15 at 12:59
  • Did you find any solution to this problem ? I am facing the exact same issues right now and I do not know where to go next. – jcxz Nov 04 '15 at 23:51
  • Firstly you should to add right repository. For installing *clang 3.7* on *Ubuntu 14.04* you need to run `apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main"` command from the [list](http://llvm.org/apt/). I can't find *clang 3.8* repository address. – Tomilov Anatoliy Nov 23 '15 at 02:47

1 Answers1

6

As Orient says in a comment, you first need to add the repository. But which repository? The answer turns out to be hidden in plain sight on the page you linked. Since 3.8 is the current version, it turns out you need to add the repository without a version number. I don't know what distribution your version of Linux Mint translates to, but for Ubuntu 14.04 to match Orient's example, you would use:

sudo apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"

sudo apt-get update

sudo apt-get install clang-3.8 lldb-3.8

$ clang-3.8 -v
Ubuntu clang version 3.8.0-svn262614-1~exp1 (trunk) (based on LLVM 3.8.0)
Arne Mertz
  • 125
  • 1
  • 6
Nathan Kurz
  • 161
  • 1
  • 2