Apt 无法正常工作

Apt 无法正常工作

我最近手动安装了一些库,其中之一是

$ sudo dpkg -i libstdc++6_4.8.2-19ubuntu1_amd64.deb 

dpkg: warning: downgrading libstdc++6:amd64 from 5.4.0-6ubuntu1~16.04.4 to 4.8.2-19ubuntu1
(Reading database ... 268816 files and directories currently installed.)
Preparing to unpack libstdc++6_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libstdc++6:amd64 (4.8.2-19ubuntu1) over (5.4.0-6ubuntu1~16.04.4) ...
dpkg: dependency problems prevent configuration of libstdc++6:amd64:
 libstdc++6:amd64 depends on gcc-4.8-base (= 4.8.2-19ubuntu1); however:
  Package gcc-4.8-base is not installed.

dpkg: error processing package libstdc++6:amd64 (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Errors were encountered while processing:
 libstdc++6:amd64

此后,每当我尝试使用 apt 命令时,都会出现以下错误

$ sudo apt update 

apt: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0)
apt: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0)
apt: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0)
apt: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0)
apt: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0)

相关内容