Sunday, October 26, 2014

APT-GET behind Proxy Server, BADSIG GPG Error or Mergelist problem


All these problems are related with your proxy settings.  I could not solve them either.  In this post, I am trying to collect all the solutions that have been suggested by others:

Common Error:

W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key

The usual solution that works for me sometimes is as follows:

$ sudo rm -rf /var/lib/apt/lists/*
$ sudo apt-get update or
$ sudo apt-get update -o Acquire::BrokenProxy=True

You can ignore warnings and gpg errors. However, attempting to obtain the key does not work for me.


$ sudo apt-key adv --keyserver-options http-proxy=http://login:password@proxy.server.com:8080/ --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.eXfoRdf3Dx --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver-options http-proxy=http://xxxxx:yyyyy@proxy.server.com:8080/ --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

Many have suggested to use the following command. This does not help either.

$ sudo apt-get update -o Acquire::BrokenProxy=True -o Acquire::http::No-Cache=True


Note that these problems do not arise if you are directly connected to the internet.

No comments: