Debian/Ubuntu Linux 下安装LLVM/Clang 编译器
(加入源后务必执行apt-get update,假设有错误提示,先执行第二步,然后apt-get update)
Debian平台:
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
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-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
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
第三步,能够開始用apt安装了
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
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。