未满足的依赖项 libc++

未满足的依赖项 libc++

我应该如何在我的 lubuntu 机器上正确安装 clang 的 c++ 库(带有 STL)?我想使用 clang 及其 c++ 库,因为它为即将推出的 c++14 标准提供了更好的支持。

尝试安装 libc++ 时:

sudo apt-get install libc++

我得到:

<!-- Fairly large amount of installed/up-to-date packages which I removed from the post-->
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libcgi-application-plugin-captcha-perl : Depends: libdata-random-perl but it is not going to be installed
 libcloog-isl-dev : Conflicts: libcloog-ppl-dev but 0.16.1-5 is to be installed
 libclutter-gst-2.0-doc : Conflicts: libclutter-gst-doc but 1.6.0-2build1 is to be installed
 libcuda1-304 : Conflicts: libcuda-5.0-1
 libcuda1-304-updates : Conflicts: libcuda-5.0-1
 libcuda1-331 : Breaks: libcuda-5.0-1
                Breaks: libcuda-5.5-1
 libcuda1-331-updates : Breaks: libcuda-5.0-1
                        Breaks: libcuda-5.5-1
 libcunit1-ncurses : Conflicts: libcunit1 but 2.1-2.dfsg-1 is to be installed
 libcunit1-ncurses-dev : Conflicts: libcunit1-dev but 2.1-2.dfsg-1 is to be installed
 libcurl4-gnutls-dev : Conflicts: libcurl4-nss-dev but 7.35.0-1ubuntu2 is to be installed
                       Conflicts: libcurl4-openssl-dev but 7.35.0-1ubuntu2 is to be installed
 libcurl4-nss-dev : Conflicts: libcurl4-gnutls-dev but 7.35.0-1ubuntu2 is to be installed
                    Conflicts: libcurl4-openssl-dev but 7.35.0-1ubuntu2 is to be installed
 libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.35.0-1ubuntu2 is to be installed
                        Conflicts: libcurl4-nss-dev but 7.35.0-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

我在三星 9 系列超极本上运行 lubuntu 14.04。我不明白其中的冲突,尤其是与 CUDA 相关的冲突,CUDA 应该仅适用于配备 NVidia GPU 的系统。

请告诉我还需要提供哪些其他信息。


编辑:

经过一番尝试,我安装了 libc++-dev 包:

sudo apt-get install libc++-dev

这安装了 clang 现在找到并使用的头文件。但这并没有回答最初的问题:为什么 apt-get 尝试安装显然不存在的 libc++,以及为什么会发生冲突(与 CUDA 发生冲突!)。

答案1

没有名为 的包libc++。它是libc++1

因此运行以下命令:

sudo apt-get install libc++1 multiarch-support libc6 libc++-dev libc++-helpers libc++-test libc++abi-dev libc++abi-test libc++abi1

答案2

首先输入“sudo apt-get -f install”。这将尝试修复损坏的依赖项。如果结果为“and x not updated”,则随后输入以下内容:“sudo apt-get dist-upgrade”。最后这条命令可能会安装一些新软件包,因此请小心。

答案3

该软件包libc++不存在。最有可能的是,apt-get将“libc++”视为正则表达式并安装与该正则表达式匹配的所有内容。因此,您会得到一长串要安装的软件包。

您(可能)正在寻找的包是libc++1

相关内容