无法解决“以下包有未满足的依赖项”问题

Lew*_*uce 6 linux ubuntu

我只是想通过运行将我的 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
Run Code Online (Sandbox Code Playgroud)

我试过跑步,dpkg --configure -a但没有任何反应。也试过apt clean,,apt autoclean仍然没有运气。

我的/etc/apt/sources.list文件中唯一的内容是以下行:

deb http://http.kali.org/kali kali-rolling main non-free contrib
Run Code Online (Sandbox Code Playgroud)

也试过运行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).
Run Code Online (Sandbox Code Playgroud)

我也尝试过安装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).
Run Code Online (Sandbox Code Playgroud)

任何关于能够解决这些问题的建议将不胜感激。

gei*_*007 15

发布我之前的评论作为答案(这只是一个评论,因为我不确定它是否会完全解决问题):

对 SO上的类似问题的尝试编辑中,提到了一个潜在的(对于你的情况我认为是部分)解决方案:运行

sudo apt-get install gcc-9-base libgcc-9-dev libc6-dev
Run Code Online (Sandbox Code Playgroud)

允许libc6-dev安装它解决了我的问题,这基本上与 mbomb007 在他们的评论中提到的内容相同。
之后我可以apt-get dist-upgrade; apt upgrade但是,如果做了什么,我没有尝试。