Apt upgrade is failing with following error

What have you tried: apt upgrade

What is the error:
└─# apt 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:
kali-linux-headless : Depends: tftp-hpa but it is not installed
Depends: traceroute
Recommends: gss-ntlmssp but it is not installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

What device is this on: Oracle Cloud Infrastructure

1 Like

first you should update apt before trying to upgrade
apt update

and then, have you tried the suggested fix apt gave you?

try any apt configuration file is locked, also try this to check dpkg configuration…
sudo dpkg --configure -a

Thanks, All! The issue has been resolved after doing the following:
dpkg --configure -a
apt update
apt --fix-broken install
apt full-upgrade

2 Likes

Processing triggers for man-db (2.13.0-1) …
setpriv: setresgid failed: Operation not permitted
Processing triggers for debianutils (5.21) …
Processing triggers for kali-menu (2024.4.0) …
/var/lib/dpkg/info/kali-menu.postinst: 28: /usr/share/kali-menu/update-kali-menu: not found
dpkg: error processing package kali-menu (–configure):
installed kali-menu package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
kali-menu

This is what I get when I do that. Not sure why

dpkg: error processing archive /var/cache/apt/archives/perl-base_5.40.0-8_arm64.deb (–unpack):
unable to stat ‘./usr/bin/perl’ (which was about to be installed): Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/perl_5.40.0-8_arm64.deb
/var/cache/apt/archives/perl-base_5.40.0-8_arm64.deb
Error: Sub-process /usr/bin/dpkg returned an error code (1)

in the menu → kali tweaks

change to cloudflare cdns and try updating again

I tried everything couldn’t get any upgrades etc
I installed andronix and then installed Kali through there. Now everything works perfectly

I want to share something that means a lot to me, which is my passion for cybersecurity. This field is not just a technology or skill for me; it is a path through which I see an opportunity to protect others and help them in a digital world full of challenges. I want to become strong in this field, not just to prove myself, but to use my knowledge and abilities to do good. I want to contribute to protecting data and information, and to be a shield for individuals and organizations that may face cyber threats. I see cybersecurity as a means to achieve safety and stability, and I want to be part of this positive change. (I want an honest person to help me and teach me this field.)”
Orphan

1 Like