0

I am running Kali Linux. Whenever I run apt-get upgrade I get the following error. I tried apt --fix-broken install. Not working.

apt-get upgrade                                                                                           

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 autopsy : Depends: binutils but it is not installed
 clang-11 : Depends: binutils but it is not installed
 clang-9 : Depends: binutils but it is not installed
 dpkg-dev : Depends: binutils but it is not installed
 gcc-10 : Depends: binutils (>= 2.35.1) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I get this as output:

After this operation, 16.2 MB of additional disk space will be used. Do you want to continue? [Y/n] y 
Err:1 http.kali.org/kali kali-rolling/main amd64 gcc-12-base amd64 12.2.0-11 404 Not Found [IP: 192.99.200.113 443]

It says similar thing 23 times. Then it says this

E: Failed to fetch http.kali.org/kali/pool/main/g/gcc-12/… 404 Not Found [IP: 192.99.200.113 443]
                                                                                      
4
  • I get this as output: After this operation, 16.2 MB of additional disk space will be used. Do you want to continue? [Y/n] y Err:1 http.kali.org/kali kali-rolling/main amd64 gcc-12-base amd64 12.2.0-11 404 Not Found [IP: 192.99.200.113 443]
    – jimmy
    Feb 8 at 21:19
  • it says similar thing 23 times. then it says this E: Failed to fetch http.kali.org/kali/pool/main/g/gcc-12/… 404 Not Found [IP: 192.99.200.113 443]
    – jimmy
    Feb 8 at 21:21
  • Welcome to the community. Please note that SE sites aren't discussion boards - there's no need to add info on comments. The right way is to edit your question. No need now, I already did it for you so you can delete these comments. As you're new, I'd recommend taking the Tour and checking Asking and Answering in the Help - that's the best way to learn how these sites work. Feb 8 at 21:49
  • 1
    Based on your original question I get the feeling that you're quite new to Linux. Kali isn't really the distro for beginners. It's not a desktop OS, but a toolbox for security professionals with a LOT of quirks not see with a desktop OS like Debian or Ubuntu. AFAIK even most of the pros don't run it on hardware but as a Virtual Machine. So if you are a beginner, I'd really suggest learning the basics on a more approachable distro, and once you get those down pat, downloading a ready-made VM of Kali - or just install the tools you want to learn, they're freely available for any distro :-) Feb 8 at 21:59

2 Answers 2

1

You've probably broken your installation of Kali. (It's neither Debian nor Ubuntu, but a very specific distribution designed for professional pentesters who are familiar with Linux-based systems.)

Trying removing google-chrome.list from /etc/apt/sources.d. If you're lucky you've not broken too much of your Kali distribution and these two commands will get you back on the right track

apt update
apt full-upgrade

For context please read Kali's own documentation about repositories and in particular the section entitled "Non-Kali Repositories",

[…] adding other operating system’s repositories into Kali (such as trying to put Ubuntu on Kali), will break your installation. This is the single most common reason why Kali Linux systems break

1
  • In general reading Kali's documentation is very much recommended, nay, even necessary... Feb 8 at 22:09
0
Err:1 http.kali.org/kali kali-rolling/main amd64 gcc-12-base amd64 12.2.0-11 404 Not Found

apt is trying to download gcc-12-base_12.2.0-11_amd64.deb which does not exist in the repository, even though versions 12.2.0-9 and 12.2.0-14 both do.

Most likely that means you are trying to run apt-get --fix-broken install with an out-of-date package catalog.

First update the package catalog with apt-get update, so apt-get will know what packets the repository actually has. Then you can run apt-get --fix-broken install, and after that apt-get upgrade should also work.

2
  • I tried it and I get the following error. W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
    – jimmy
    Feb 8 at 21:49
  • Has this installation of Kali not been updated in a long time? It looks like at least the Google Chrome's repository key has been changed in the meantime, and the old key has expired. You'll now need to update the expired repository key(s) manually. You'll find instructions on updating Google's repository key here: google.com/linuxrepositories . See Command line key installation for APT.
    – telcoM
    Feb 8 at 22:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .