损坏的软件包 libapt-pkg5.0

损坏的软件包 libapt-pkg5.0

我尝试apt updateapt upgrade,但随后出现此错误消息。

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
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:
 dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.2.35 is to be installed
E: Broken packages

我在网上搜索了一个小时,但没有找到任何关于如何修复它的建议。

我试过sudo apt-get -f install sudo dpkg --configure -a sudo apt-get update --fix-missing sudo apt-get --fix-broken install

当我尝试使用sudo apt-get install --reinstall libapt-pkg5.0这个时出现:

WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt adduser (due to apt) dash dpkg (due to dash) debconf (due to dash) grep install-info (due to grep) gzip init systemd-sysv (due to init)
  init-system-helpers (due to init) perl-base (due to init-system-helpers) login libpam0g (due to login) libpam-runtime (due to login)
  libpam-modules (due to login) mount util-linux (due to mount) shim-signed grub-efi-amd64-signed (due to shim-signed)
  grub2-common (due to shim-signed) mokutil (due to shim-signed) sbsigntool (due to shim-signed)
0 upgraded, 1 newly installed, 1805 to remove and 2 not upgraded.
Need to get 715 kB of archives.
After this operation, 7.831 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

(消息中有很多与系统相关的包)

如果你需要更多信息,我可以提供给你

相关内容