All my Ubuntu VMs have apt-get update problems

I'm running Virtualbox 4.1 on an x86_64 Windows 7 host. I've got a collection of 12.04 and 10.04 LTS VMs I use to create debs for work. In the last week I started noticing problems on the 12.04 VMs. Tried the usual apt-get clean bit which didn't help.

I rolled a new 11.10 VM for testing a Worpress upgrade. This VM has never been able to run apt-get update without errors. The interesting errors look like this:

Get: 8 oneiric-security/main Translation-en_US [344 B]
14% [7 Sources 48686/877 kB 6%] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
Hit oneiric-security/multiverse Translation-en
Hit oneiric-security/restricted Translation-en
Hit oneiric-security/universe Translation-en
22% [7 Sources 127526/877 kB 15%] [Waiting for headers]/usr/bin/xz: (stdin): File format not recognized

and ends with

/usr/bin/xz: (stdin): File format not recognized
Ign oneiric/main Translation-en_US
Ign oneiric-updates/main Translation-en_US
Fetched 18.5 MB in 47s (392 kB/s)
W: GPG error: oneiric InRelease: File /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_oneiric_InRelease doesn't start with a clearsigned message
W: GPG error: oneiric-security InRelease: File /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_oneiric-security_InRelease doesn't start with a clearsigned message

xv-utils, lzma, etc are all installed. I've reinstalled the VM from scratch three times and up at the same point.

3 Answers

This was a doozy.

The problem was that I had recently switched Virtualbox to NAT the Ubuntu VMs rather than bridge them. I ran several tests and found that if NAT was enabled, encoding problems developed on the incoming files. Once I returned the main interface to bridge mode the error changed to the standard BADSIG one which was fixed by grabbing the key again from keyserv and running the apt-get clean stuff.

2

This solution worked perfectly in my case:

Change the config file that apt uses to look for the update url

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup -- to keep a backup of the conf

sudo gedit /etc/apt/sources.list

in the editor just find and replace all the http:// to ftp://

or

delete everything and replace it with mirror.

deb ftp-mirror name YOUR_UBUNTU_VERSION_HERE main
deb-src ftp-mirror name YOUR_UBUNTU_VERSION_HERE main 

(can get other mirrors from here)

I did this because for some reason running in virtual machine http:// was not working with apt. Try this out hope this will work

1

I had a similar issue with 12.04 running as Parallels VM, apt-get update gave med BADSIG for us.achive.ubuntu.com. I switched to a different mirror (see links in ) in /etc/apt/sources.list and now update works again.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like