我想使用以下命令安装特定版本的 libstd++6:
# apt-get install libstdc++6=4.9.0-8 -V
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libstdc++6 (4.8.2-16)
0 upgraded, 0 newly installed, 0 to remove and 216 not upgraded.
它没有给出错误,但 apt 保留了已安装的版本。并且它将这个包称为“额外的”。
/etc/apt/preferences.d 中没有设置 apt 首选项。而且我们本地镜像中肯定有理想的版本。(如果我尝试运行“apt-get download libstdc++6=4.9.0-8”,它将下载理想的版本。)
系统信息:
# cat /etc/issue.net
"Debian GNU/Linux jessie/sid"
# uname -a
Linux www27 3.13-1-amd64 #1 SMP Debian 3.13.7-1 (2014-03-25) x86_64 GNU/Linux.
# dpkg -l |egrep -i "apt|dpkg"
ii apt 0.9.16.1 amd64 commandline package manager
ii dpkg 1.17.6 amd64 Debian package management system
有什么建议么?
答案1
因此,事实证明 libstd++6_4.9.0-8 依赖于 gcc-4.9-base (= 4.9.0-8)。但是我安装的是 4.9.0-7 版本的 gcc-4.9-base。
我尝试使用 dpkg 安装之前下载的包后就明白了这一点。
# apt-get download libstdc++6=4.9.0-8
# dpkg -i libstdc++6_4.9.0-8_amd64.deb
(Reading database ... 64836 files and directories currently installed.)
Preparing to unpack libstdc++6_4.9.0-8_amd64.deb ...
Unpacking libstdc++6:amd64 (4.9.0-8) over (4.8.2-16) ...
dpkg: dependency problems prevent configuration of libstdc++6:amd64:
libstdc++6:amd64 depends on gcc-4.9-base (= 4.9.0-8); however:
Version of gcc-4.9-base:amd64 on system is 4.9.0-7.
dpkg: error processing package libstdc++6:amd64 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libstdc++6:amd64
有人知道如何调试 apt 或使其输出更详细吗?(我想知道它以备将来之用)