Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 http://security.ubuntu.com 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 http://security.ubuntu.com oneiric-security/multiverse Translation-en
Hit http://security.ubuntu.com oneiric-security/restricted Translation-en
Hit http://security.ubuntu.com 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 http://us.archive.ubuntu.com oneiric/main Translation-en_US                                                    
Ign http://us.archive.ubuntu.com oneiric-updates/main Translation-en_US                                            
Fetched 18.5 MB in 47s (392 kB/s)                                                                                  
W: GPG error: http://us.archive.ubuntu.com 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: http://security.ubuntu.com 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.

share|improve this question

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer
1  
kashani, it is allowed and even encouraged to mark your own answer as The Answer™ if it is the one you wanted. This lets anyone else who has your problem know that you have a solution, not merely that you are looking for one. –  zpletan Jun 11 '12 at 5:27
    
Yep, it just won't let me do it for another day. –  kashani Jun 11 '12 at 16:03

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

share|improve this answer
    
Thanks a Lot! Changing http:// to ftp:// fixed the Issue! –  SrikanthJeeva Nov 30 '13 at 13:19

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 https://help.ubuntu.com/community/Repositories/CommandLine) in /etc/apt/sources.list and now update works again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.