The first step is to edit the/etc/apt/sources.list first, adding the following source:
(Be sure to perform apt-get update after adding the source, assuming that there is an error, perform the second step first, and then Apt-get Update)
Debian Platform:
Deb Http://llvm.org/apt/wheezy/llvm-toolchain-wheezy Main
DEB-SRC Http://llvm.org/apt/wheezy/llvm-toolchain-wheezy Main
Deb Http://llvm.org/apt/unstable/llvm-toolchain Main
DEB-SRC Http://llvm.org/apt/unstable/llvm-toolchain Main
# 3.4
Deb http://llvm.org/apt/unstable/llvm-toolchain-3.4 Main
DEB-SRC http://llvm.org/apt/unstable/llvm-toolchain-3.4 Main
# 3.5
Deb http://llvm.org/apt/unstable/llvm-toolchain-3.5 Main
DEB-SRC http://llvm.org/apt/unstable/llvm-toolchain-3.5 Main
Ubuntu Platform:
Deb http://llvm.org/apt/precise/ Llvm-toolchain-precise main
Deb-src http://llvm.org/apt/precise/llvm-toolchain-precise main
# 3.4
Deb http ://llvm.org/apt/precise/llvm-toolchain-precise-3.4 main
Deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 Main
# 3.5
Deb http://llvm.org/apt/precise/llvm-toolchain-precise-3.5 main
DEB-SRC http://llvm.org/apt/precise/llvm-toolchain-precise-3.5 Main
# Common
Deb http://ppa.launchpad.net/ Ubuntu-toolchain-r/test/ubuntu Precise main Deb Http://llvm.org/apt/trusty/llvm-toolchain-trusty Main
DEB-SRC Http://llvm.org/apt/trusty/llvm-toolchain-trusty Main
# 3.4
Deb http://llvm.org/apt/trusty/llvm-toolchain-trusty-3.4 Main
DEB-SRC http://llvm.org/apt/trusty/llvm-toolchain-trusty-3.4 Main
# 3.5
Deb http://llvm.org/apt/trusty/llvm-toolchain-trusty-3.5 Main
DEB-SRC http://llvm.org/apt/trusty/llvm-toolchain-trusty-3.5 Main
The second step, must obtain the related certificate before the installation
Wget-o-Http://llvm.org/apt/llvm-snapshot.gpg.key|sudo Apt-key Add-
The third step is to start using apt to install the
Apt-get Install clang-3.4 lldb-3.4
To install all packages:
Apt-get Install clang-3.4 clang-3.4-doc libclang-common-3.4-dev libclang-3.4-dev libclang1-3.4 libclang1-3.4-dbg Libllvm-3.4-ocaml-dev libllvm3.4 libllvm3.4-dbg lldb-3.4 llvm-3.4 llvm-3.4-dev llvm-3.4-doc llvm-3.4-examples Llvm-3.4-runtime clang-modernize-3.4 clang-format-3.4 python-clang-3.4 Lldb-3.4-dev
Installing the Llvm/clang compiler under Debian/ubuntu Linux