在Ubuntu 14.04.3上安装clang 3.8

我尝试过以下明显的命令:

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

但我收到的消息是:

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

我试过了:

 sudo apt-get update sudo aptitude install clang-3.8 

但得到消息:

 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. 

希望一个版本的clang比3.5更新。 有什么建议?

看起来14.04.3的最新版本是Trusty Updates中的clang 3.6 。 但是开发人员维护PPA应该可以获得最新版本:

LLVM Debian / Ubuntu每晚包

要安装3.8,您首先要添加密钥:

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

然后通过手动/etc/apt/sources.list下行添加到/etc/apt/sources.list (或使用gui’软件和更新’)来添加3.8的存储库:

 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 

按如下方式测试安装:

 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:~$ 

希望这会让你去…

    Interesting Posts