Cannot sudo apt update, upgrade and connection times out when I run anonsurf

┌──(root㉿kali)-[/home/abmurshed]
└─# sudo apt update
Ign:2 https://apt.postgresql.org/pub/repos/apt kali-rolling-pgdg InRelease  
Err:3 https://apt.postgresql.org/pub/repos/apt kali-rolling-pgdg Release
  404  Not Found [IP: 72.32.157.246 443]
Hit:1 http://kali.cs.nycu.edu.tw/kali kali-rolling InRelease         
Ign:4 https://deb.i2p2.de buster InRelease                           
Ign:5 https://deb.i2p2.de unstable InRelease   
Ign:4 https://deb.i2p2.de buster InRelease
Ign:5 https://deb.i2p2.de unstable InRelease
Ign:4 https://deb.i2p2.de buster InRelease
Ign:5 https://deb.i2p2.de unstable InRelease
Err:4 https://deb.i2p2.de buster InRelease
  Could not connect to deb.i2p2.de:443 (193.150.121.17), connection timed out
Err:5 https://deb.i2p2.de unstable InRelease
  Unable to connect to deb.i2p2.de:https:
Reading package lists... Done
E: The repository 'https://apt.postgresql.org/pub/repos/apt kali-rolling-pgdg Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Hello,

Welcome to the forum ! We hope you find this to be a friendly and helpful place, and that you enjoy your time here.

The reason you are getting these errors on an apt update is pretty much exactly as spelled out in the text that you posted - at least one of your configured repositories does not have support for the "kali-rolling-pgdg" release.

For example, take a look at Index of /pub/repos/apt/dists/ yourself, and you'll see that amongst the various releases it supports, there is no mention of "kali-rolling-pgdg".

Some Googling seems to indicate that this is something that used to work, but a few years back PostgreSQL removed support for Kali from their repos because PostgreSQL packages can now be found in Kali directly. So you probably just need to disable and/or remove the now-non-functional repos from your local apt repository list, and then everything should be fine.

If you are actually using the PostgreSQL packages that came from that repo, then you'll probably want at some point to see if there are now equivalent (or even perhaps more recent) PostgreSQL packages in your Kali OS repos, and if so you could look at replacing the now-defunct packages with those equivalents. If you're not actually using PostgreSQL packages at all, then none of this matters and you can simply disable/remove the now-dead repos and carry on happily.

Hope this helps !

3 Likes