Bizzard's Hackshop
Always under construction!

At times, in systems configured to use both IPv4 and IPv6 addresses the debian package manager (apt / apt-get / aptitude) uses IPv6 by default for outgoing connections and fails to resolve/connect. The solution is to force it to use IPv4

Add -o Acquire::ForceIPv4=true when running apt-get or apt.

If you want to make the setting persistent just create /etc/apt/apt.conf.d/99force-ipv4 and put Acquire::ForceIPv4 "true"; in it:

echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
No Comments |

Being a Debian user, I always like to experiment with the latest packages, and so I have many third party debian repositories listed in the sources.list file. Whenever I am adding it for the first time, I usually get the error:

“The following signatures couldn’t be verified because the public key is not available”

On googling multiple solutions can be found to add a public key using apt-key, but most of them has 3 or 4 commands, including downloading the key, move it to a file and then import. But the one line command that does the same is as below:

apt-key adv --keyserver keyserver_url --recv-keys key_id
No Comments |