I am just simply trying to update my Kali box from Kali 2019.4 to 2020.2 by running apt update; apt upgrade
, but when I tried to do that, I started receiving the errors below.
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
I have tried running dpkg --configure -a
but nothing happens. Have also tried apt clean
, apt autoclean
, still no luck.
The only thing that's in my /etc/apt/sources.list
file is the following line:
deb http://http.kali.org/kali kali-rolling main non-free contrib
Have also tried running apt dist-upgrade -y
and still the same error:
# 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).
I have tried to also just install libc6-dev
and then got the next error:
# 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).
Any advice on being able to resolve these issues would be greatly appreciated.
libc6-dev : Breaks: libgcc-9-dev (< 9.3.0-5~) but 9.2.1-22 is to be installed
apt-get install gcc-9-base libgcc-9-dev libc6-dev
allows for libc6-dev to be installed which solved my issue that was basically idential to what @mbomb007 mentioned in their comment. After that I couldapt-get dist-upgrade
; I didn't try out ifapt upgrade
did something however.