如何修复 Kali Linux 中损坏的软件包?

如何修复 Kali Linux 中损坏的软件包?

我试图更新和升级我的软件包,但是当我执行以下命令时:

sudo apt upgrade && sudo apt update

出现以下消息:

Hit:1 https://download.sublimetext.com apt/stable/ InRelease                            
Hit:2 http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
767 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
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:
 gnustep-base-runtime : Depends: gnustep-base-common (= 1.27.0-3) but 1.26.0-7 is to be installed
 libgnustep-base1.27 : Depends: gnustep-base-common (= 1.27.0-3) but 1.26.0-7 is to be installed
E: Broken packages

我尝试执行以下命令:

sudo dpkg --configure -a
sudo apt install -f
sudo apt update && sudo apt upgrade

但还是报错。

我现在应该做什么?...提前谢谢您...

答案1

第一:尝试 apt-get 命令(如果没有)

apt-get update && apt-get upgrade 

那么这些命令将帮助清理你的依赖关系

sudo apt-get autoclean &&  sudo apt-get clean && sudo apt-get autoremove

那些帮助解决了类似的问题。我希望他们也对你有帮助;)

答案2

所以这对我有用

我使用以下命令重新安装 libwacom-common 和 libwacom-bin:

sudo apt reinstall libwacom-common && sudo apt reinstall libwacom-bin

答案3

sudo apt-get update --fix-missing

sudo apt-get upgrade --fix-missing

答案4

我建议跑步

    sudo apt-get autoclean &&  sudo apt-get clean && sudo apt-get autoremove && sudo apt-get update --fix-missing && sudo apt-get upgrade --fix-missing

相关内容