I frequently cross this issue, and always have to google for an answer. Does anyone have a permanent fix for BADSIG errors from apt-get
?
W: GPG error: http://download.virtualbox.org lucid Release: The following signatures were invalid: BADSIG 54422A4B98AB5139 Oracle Corporation (VirtualBox archive signing key)
Here's the (easiest) solution:
Type the following commands in the Terminal:
Credits: ubuntugeek.com
Edit:
If the error occurs again (maybe after a few days/months), open Nautilus as root > navigate to
var/lib/apt
> delete the "lists.old" folder > then open the "lists" folder and delete the "partial" folder. Now, execute the aforementioned commands again.The important part of your error message is the following in bold:
Copy the stuff in bold and then open a terminal and type:
i.e. paste using SHIFT + INS the number you have copied - 54422A4B98AB5139
You'll have to enter your password, the key will be downloaded and integrated.
Try deleting the key
then updating the repository
You should get a
NO_PUBKEY
error instead of aBADSIG
error andshould not find the key (called "Ubuntu Extras Archive Automatic Signing Key")
Now add the key
The result of
apt-key finger
should haveIf that does not work, try
Source: this ubuntu forums thread
Another easier way to resolve BADSIG GPG errors is via a software called
Y PPA manager
Click on
Advanced
And then select
Fix all GPG Badsig errors
If you still have this error after adding the key try:
goto your apt-cacher-ng cache directory, and delete the virtualbox entry:
Found another server that we could use: