当我输入:
sudo apt-get install libstdc++
我有:
The following packages have unmet dependencies:
libstdc++-4.8-doc : Conflicts: libstdc++6-4.4-doc but 4.4.7-8ubuntu1 is to be installed
Conflicts: libstdc++6-4.6-doc but 4.6.4-6ubuntu2 is to be installed
Conflicts: libstdc++6-4.7-doc but 4.7.3-12ubuntu1 is to be installed
libstdc++6-4.6-dbg : Conflicts: libstdc++6-4.4-dbg but 4.4.7-8ubuntu1 is to be installed
libstdc++6-4.6-doc : Conflicts: libstdc++6-4.4-doc but 4.4.7-8ubuntu1 is to be installed
libstdc++6-4.7-dbg : Conflicts: libstdc++6-4.4-dbg but 4.4.7-8ubuntu1 is to be installed
Conflicts: libstdc++6-4.6-dbg but 4.6.4-6ubuntu2 is to be installed
libstdc++6-4.7-doc : Conflicts: libstdc++6-4.4-doc but 4.4.7-8ubuntu1 is to be installed
Conflicts: libstdc++6-4.6-doc but 4.6.4-6ubuntu2 is to be installed
libstdc++6-4.8-dbg : Conflicts: libstdc++6-4.4-dbg but 4.4.7-8ubuntu1 is to be installed
Conflicts: libstdc++6-4.6-dbg but 4.6.4-6ubuntu2 is to be installed
Conflicts: libstdc++6-4.7-dbg but 4.7.3-12ubuntu1 is to be installed
libstdc++6-4.8-dbg-armhf-cross : Conflicts: libstdc++6-4.7-dbg-armhf-cross but 4.7.3-11ubuntu1cross1.85 is to be installed
E: Unable to correct problems, you have held broken packages.
有什么想法吗?
编辑:
同样的问题:
sudo apt-get install clang++
得到:
The following packages have unmet dependencies:
clang-3.3 : Breaks: clang-3.4 but 1:3.4-1ubuntu3 is to be installed
clang-3.4 : Breaks: clang-3.3 but 1:3.3-16ubuntu1 is to be installed
clang-3.5 : Breaks: clang but 1:3.4-0ubuntu1 is to be installed
Breaks: clang-3.3 but 1:3.3-16ubuntu1 is to be installed
Breaks: clang-3.4 but 1:3.4-1ubuntu3 is to be installed
clang-format-3.3 : Breaks: clang-format-3.4 but 1:3.4-1ubuntu3 is to be installed
clang-format-3.4 : Breaks: clang-format-3.3 but 1:3.3-16ubuntu1 is to be installed
clang-format-3.5 : Breaks: clang-format-3.3 but 1:3.3-16ubuntu1 is to be installed
python-clang-3.3 : Breaks: python-clang-3.4 but 1:3.4-1ubuntu3 is to be installed
python-clang-3.4 : Breaks: python-clang-3.3 but 1:3.3-16ubuntu1 is to be installed
Breaks: python-clang-3.5 but 1:3.5~svn201651-1ubuntu1 is to be installed
python-clang-3.5 : Breaks: python-clang-3.3 but 1:3.3-16ubuntu1 is to be installed
Breaks: python-clang-3.4 but 1:3.4-1ubuntu3 is to be installed
E: Unable to correct problems, you have held broken packages.
答案1
libstdc++
不是二进制软件包名称。由于libstdc++
未找到与名称匹配的软件包,apt-get
因此搜索与此正则表达式匹配的软件包,因此想要安装 4.4、4.6、4.7 和 4.8 以及相关-doc
文件-dbg
。同样适用于clang++
相反,您可能正在寻找的包libstdc++6
(用于您的第一个命令)和libc++1
(用于您的第二个命令)。