vickycq 写道:
蓝芝熊 写道:
1.直接apt-get,失败;
3.在packages.ubuntu.com里找,这下找到了,下载了一个amd64的deb包,安装成功。
说明你的 sources.list 配置不正确
例如 未正确开启 universe 区
执行以下指令将结果全部复制贴上来
代码:
dpkg -l | grep clang
cat /etc/os-release
cat /etc/apt/sources.list
dpkg -l | grep clang
ii clang 1:3.8-33ubuntu3 amd64 C, C++ and Objective-C compiler (LLVM based)
ii clang-3.8 1:3.8-2ubuntu3 amd64 C, C++ and Objective-C compiler (LLVM based)
ii libclang-common-3.8-dev 1:3.8-2ubuntu3 amd64 clang library - Common development package
ii libclang1-3.6:amd64 1:3.6.2-3ubuntu2 amd64 C interface to the clang library
ii libclang1-3.8:amd64 1:3.8-2ubuntu3 amd64 C interface to the clang library
cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial
cat /etc/apt/sources.list
deb
http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src
http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
deb
http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src
http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb
http://cn.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src
http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb
http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src
http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb
http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src
http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb
http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src
http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb
http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src
http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb
http://archive.canonical.com/ubuntu xenial partner
# deb-src
http://archive.canonical.com/ubuntu xenial partner
deb
http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src
http://security.ubuntu.com/ubuntu xenial-security main restricted
deb
http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src
http://security.ubuntu.com/ubuntu xenial-security universe
deb
http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src
http://security.ubuntu.com/ubuntu xenial-security multiverse
sources.list里的一些注释我没贴出来,不影响吧