我只是试图通过运行将我的 Kali 盒从 Kali 2019.4 更新到 2020.2 apt update; apt upgrade
,但是当我尝试这样做时,我开始收到以下错误。
root@kali:~# apt-get check
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:
build-essential : Depends: libc6-dev but it is not installed or
libc-dev
clang-6.0 : Depends: libc6-dev but it is not installed
clang-7 : Depends: libc6-dev but it is not installed
clang-8 : Depends: libc6-dev but it is not installed
Recommends: libomp-8-dev but it is not installed
libbluetooth-dev : Depends: libc6-dev but it is not installed or
libc-dev
libexpat1-dev : Depends: libc6-dev but it is not installed or
libc-dev
libncurses-dev : Depends: libc6-dev but it is not installed or
libc-dev
libstdc++-7-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
libstdc++-8-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
libstdc++-9-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@kali:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not installed or
libc-dev
clang-6.0 : Depends: libc6-dev but it is not installed
clang-7 : Depends: libc6-dev but it is not installed
clang-8 : Depends: libc6-dev but it is not installed
Recommends: libomp-8-dev but it is not installed
libbluetooth-dev : Depends: libc6-dev but it is not installed or
libc-dev
libexpat1-dev : Depends: libc6-dev but it is not installed or
libc-dev
libncurses-dev : Depends: libc6-dev but it is not installed or
libc-dev
libstdc++-7-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
libstdc++-8-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
libstdc++-9-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
我尝试过运行dpkg --configure -a
,但什么也没发生。也尝试过apt clean
,,apt autoclean
仍然没有成功。
我的文件中唯一的东西/etc/apt/sources.list
是以下行:
deb http://http.kali.org/kali kali-rolling main non-free contrib
也尝试运行apt dist-upgrade -y
但仍然出现同样的错误:
# apt dist-upgrade -y
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:
build-essential : Depends: libc6-dev but it is not installed or
libc-dev
clang-6.0 : Depends: libc6-dev but it is not installed
clang-7 : Depends: libc6-dev but it is not installed
clang-8 : Depends: libc6-dev but it is not installed
Recommends: libomp-8-dev but it is not installed
libbluetooth-dev : Depends: libc6-dev but it is not installed or
libc-dev
libexpat1-dev : Depends: libc6-dev but it is not installed or
libc-dev
libncurses-dev : Depends: libc6-dev but it is not installed or
libc-dev
libstdc++-7-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
libstdc++-8-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
libstdc++-9-dev : Depends: libc6-dev (>= 2.13-5) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我也尝试过安装libc6-dev
,但出现以下错误:
# apt install libc6-dev
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:
libc6-dev : Depends: libc6 (= 2.30-7) but 2.29-1 is to be installed
Depends: libc-dev-bin (= 2.30-7) but 2.29-1 is to be installed
Depends: libcrypt-dev but it is not going to be installed
Breaks: libgcc-7-dev (< 7.5.0-6~) but 7.4.0-13 is to be installed
Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-22 is to be installed
Breaks: libgcc-9-dev (< 9.3.0-5~) but 9.2.1-8 is to be installed
Breaks: python3.7 (< 3.7.7-1+b1) but 3.7.4-4 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
如能提供任何关于解决这些问题的建议,我们将不胜感激。
答案1
答案2
我也遇到了同样的问题,但是我尝试自己解决这个问题,使用命令删除 pkg apt-get remove libc6-dev
,然后再次更新和升级我的系统,重新启动它,再次使用该命令apt-get remove python3-tornado
,然后通过系统进行更新和升级,之后,我就可以轻松地在 Kali Linux 上安装虚拟盒了。
答案3
为了解决这个问题,我们只需要移除破损的包装。
apt remove "package name"
并继续尝试apt-get upgrade
在每个步骤中更新使用它会产生一些取消静音的依赖关系,因此您必须手动删除每个包。
代码立即apt-get upgrade
开始工作。
这是解决的简单方法