我正在尝试运行apt upgrade
,但它要求我先运行apt --fix-broken install
。但是,当我运行该命令时,将得到以下输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libcrypt1 : Breaks: libc6 (< 2.29-4) but 2.27-3 is installed
libcrypt1:i386 : Depends: libc6:i386 (>= 2.25) but it is not installed
Breaks: libc6 (< 2.29-4) but 2.27-3 is installed
locales : Depends: libc-bin (> 2.29)
Depends: libc-l10n (> 2.29) but 2.27-3 is installed
locales-all : Depends: libc-l10n (> 2.29) but 2.27-3 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
出于任何原因,我似乎都无法摆脱这个错误。我已经尝试删除此输出中提到的软件包,但是没有运气,因为它们要求我再次运行apt --fix-broken install
。
尝试#1
在这里看到此帖子:https://askubuntu.com/questions/918366/error-pkgproblemresolver。但是,在运行时:
dpkg --get-selections | grep hold
没有输出,表示没有包含单词“ hold”的行。我还尝试了最佳答案中的第二个建议,即使用sudo apt-get install aptitude
安装适应性;但是,在运行此程序时,这也不起作用:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
aptitude : Depends: aptitude-common (= 0.8.12-3) but it is not going to be installed
Depends: libapt-pkg6.0 (>= 1.9.0) but it is not going to be installed
Depends: libboost-iostreams1.67.0 but it is not going to be installed
Depends: libcwidget4 (>= 0.5.18-1) but it is not going to be installed
Depends: libgcc-s1 (>= 3.0) but it is not going to be installed
Depends: libstdc++6 (>= 9) but 8.1.0-5 is to be installed
Depends: libxapian30 (>= 1.4.14~) but 1.4.5-1 is to be installed
Recommends: libparse-debianchangelog-perl but it is not going to be installed
libcrypt1 : Breaks: libc6 (< 2.29-4) but 2.27-3 is to be installed
libcrypt1:i386 : Depends: libc6:i386 (>= 2.25) but it is not going to be installed
Breaks: libc6 (< 2.29-4) but 2.27-3 is to be installed
locales : Depends: libc-bin (> 2.29)
Depends: libc-l10n (> 2.29) but 2.27-3 is to be installed
locales-all : Depends: libc-l10n (> 2.29) but 2.27-3 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Attempt#2我还尝试按照https://askubuntu.com/questions/633544/e-error-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-he的建议删除OP的错误,只是简单地删除libcrypt1,但这没有用,并为我提供了相同的错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libcrypt1:i386 : Depends: libc6:i386 (>= 2.25) but it is not going to be installed
Breaks: libc6 (< 2.29-4) but 2.27-3 is to be installed
locales : Depends: libc-bin (> 2.29)
Depends: libc-l10n (> 2.29) but 2.27-3 is to be installed
locales-all : Depends: libc-l10n (> 2.29) but 2.27-3 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
/var/log/dist-upgrade/apt.log
文件中也没有任何内容(不存在)。我的/etc/apt/sources.list
文件仅包含一行:
deb http://http.kali.org/kali kali-rolling main contrib non-free
有些东西搞砸了,我不知道是什么原因造成的。任何帮助将不胜感激!
运行dpkg -l | grep ^iU | awk '{print $2}' | xargs sudo dpkg --purge
之后,我可以继续使用apt upgrade