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?

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.