从 12.04 升级到 16.04 会破坏 libstdc++

从 12.04 升级到 16.04 会破坏 libstdc++

我将计算机从 12.04 升级到 14.04,然后从 14.04 升级到 16.04。似乎存在依赖问题,其中libstdc++依赖libstdc++-5-dev12.04 软件包和libstdc++6依赖 16.04 软件包。输出apt-get -f install

sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libstdc++-5-dev : Depends: libstdc++6 (>= 5.4.1-2ubuntu1~12.04) but 5.4.0-6ubuntu1~16.04.4 is installed
 libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.4) but 5.4.1-2ubuntu1~12.04 is installed
 libstdc++6:i386 : Depends: gcc-5-base:i386 (= 5.4.0-6ubuntu1~16.04.4) but it is not installed
                   Depends: libc6:i386 (>= 2.18) but it is not installed
                   Depends: libgcc1:i386 (>= 1:4.2) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

我该如何收拾这个烂摊子?

答案1

手动安装 gcc-5-base 5.4.0-6ubuntu1~16.04.4 让 apt-get 找到了解决办法。然后我删除了 gcc,重新安装了最新的

相关内容