私は単にapt update; apt upgrade
を実行してKaliボックスをKali 2019.4から2020.2に更新しようとしていますが、そうしようとすると、以下のエラーが発生し始めました。
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).
これらの問題を解決できるようにアドバイスをいただければ幸いです。
以前のコメントを回答として投稿する(問題が完全に解決するかどうかわからなかったため、これは単なるコメントでした):
SOでの同様の質問 の編集の試みで、潜在的な(そしてあなたの場合は部分的に私が思う)ソリューションが言及されました:実行中
apt-get install gcc-9-base libgcc-9-dev libc6-dev
libc6-devをインストールして、mbomb007が their comment で言及したものと基本的に同一である私の問題を解決できるようにします。その後、apt-get dist-upgradeを実行できます。しかし、aptアップグレードが何かをするかどうかは試しませんでした。