updating Kali

So about a week ago now I was trying to install Ghidra on my Kali VM and found that when I was trying to $sudo apt get install ghidra that it would yell at me that where Kali was pointed at for repos was out of date in addition to keys not being up to date. I spent about 15 minutes trying to solve it but didn’t get far, but resolved to fix it when I had more time. Well more time came tonight and it was a struggle. I realize that Kali may not be the typical Linux experience, but if what I experienced tonight is anything remotely what it’s like trying to update a more mainstream Linux distro then there’s no chance there will be a “Year of the Linux Desktop” as so many headlines will often proclaim during the beginning of a new year.

So in my journey to update my VM Kali distro, I started where I outlined above and tried to do the standard apt get update but that kept breaking due to keys being out of date and my distro pointing to the wrong repo. For reference, I was still on 2021.1 when I should have been on 2023.2

So I delete the seemingly offending keys and go off on a Google rabbit hole to figure out how to update where the distro is pointing at to get updates. I find some sites that talk about updating /apt/etc/sources.list to change the http:// in the repo URL to https:// which I do, which solved one part of my update problems.

After I get through that and try the $apt upgrade route which yells at me because kali-themes-common.deb can’t be updated because of dpkg dependency errors. So after searching around a bit I come across apt-get install -f which is meant to fix broken installs/depedencies. That gets me a bit further, and I try the upgrade again, but this time it hangs on Failed to activate service "org.freedesktop.systemd1 timed out" as one error that constantly comes up, along with “dpkg err: The exfat-utils package is not available, but some other package references it”`

For the first error it was an issue of running sudo kill 1 and for good measure systemctl daemon-reexec to reloaed the daemon. As for the second error that was solved with apt install exfatprogs

After this I attempted to apt upgrade and yet again was met with a missing kali-themes-common message. Luckily a StackOverflow post pointed out to use:

$dpkg --force-all --configure -a
$ dpkg --purge --force-depends kali-desktop-base
$ dpkg --purge --force-depends kali-themes-common
$ dpkg --purge --force-depends kali-themes
$apt --fix-broken install
$apt-get -f install

Finally after all of that I was finally able to update and upgrade my Kali Linux to 2023.2 and then FINALLY install Ghidra.

A good learning experience, but what a pain in the ass.