0

Im on Kali Linux and the other day I was installing some packages with apt so I could run R code (if I remember correctly I installed r-base) and ever since then my apt has been acting up. Whenever I try to install any package now I get this

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:
 apt : Depends: ubuntu-keyring but it is not installable
 apt-utils : Depends: apt (= 2.2.3) but 2.0.2ubuntu0.2 is to be installed
 r-cran-mgcv : Depends: r-cran-nlme (>= 3.1-64) but it is not going to be installed
 r-recommended : Depends: r-cran-nlme (>= 3.1.52) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I have tried --fix-broken and --fix-missing I have also tried manually install the missing things, such as r-cran-nlme which gives me this

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:
 apt : Depends: ubuntu-keyring but it is not installable
 apt-utils : Depends: apt (= 2.2.3) but 2.0.2ubuntu0.2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

and whenever I try to get another package, like mit-scheme, it goes back to the first error message again. What I find particularly odd is it keeps saying ubuntu keyring but I'm on Kali which is Debian.

Here is my sources.list

# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free

# Additional line for source packages
deb-src http://http.kali.org/kali kali-rolling main contrib non-free

How can I fix these errors and get apt working again?

UPDATE: I have tried all of the commands mentioned in the comments (update, upgrade, --fix-broken, etc.) all of them give the same error that I have listed first in this post except for update which says somthing along the lines of "the signatures are invalid" and mentions public keys. Kali is Debian I believe so I'm not sure why its asking for ubuntu things?

  • Before you started you did run `apt update` correct? For good measure, I'd run `apt update` | `apt upgrade` | `apt dist-upgrade` | `apt --fix-broken install` in that order .. This makes sure all your packages (including apt) are up to date before you run the fix .. – Zak Feb 16 '23 at 22:29
  • If it's still broken after that I'd run `sudo apt -f install` and just read the packages it wants to uninstall automatically, there might be a few problem packages that came from questionable repos? Without more information, these are all guesses .. – Zak Feb 16 '23 at 22:37
  • @Zak I have tried all of those things already. They all give me the same errors. Update gives me some kind of "signature is invalid" error. I have updated the post with this information. – Salty Sodiums Feb 16 '23 at 23:49

1 Answers1

0

https://superuser.com/a/1705251

This answer to a quesiton asked approx 2 years ago solved my problem. The answer titled "Update for 2022"

Following those instructions everything is fixed now except for one package which still has an invalid signature error but thats only spotify so not too important I suppose.

  • This answer downloads using plain HTTP and doesn't validate the package's checksum through the signed release file (which does require an adequate keyring in the first place: on an other working system or else a trustworthy site such as the distribution's site providing some additional information such as a checksum). Kali is about security:downloading the package handling the chain of trust over insecure channel should not be done without verifying its content is correct. – A.B Feb 18 '23 at 22:57