Monday, February 19, 2007

bzip2 errors running apt-get update

I kept getting an error like this running apt-get update (I'm pretty sure it was immediately following adding a new line to /etc/apt/sources.list):


Get:5 http://ftp.debian.org etch/main Sources [1222kB]
79% [4 Packages bzip2 3911680] [5 Sources 50355/1222kB 4%] 25.2kB/s
46sbzip2: Data integrity error when decompressing.
Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

Err http://ftp.debian.org etch/main Packages
Sub-process bzip2 returned an error code (2)
Fetched 5616kB in 1m32s (60.6kB/s)
Reading package lists... Done


That wasn't my actual screen scrape - that's Brian May's off Google... because mine scrolled out of my history before I thought to grab it... but...

What I did was to comment out the sources in /etc/apt/sources.list that were erroring, then re-ran apt-get update again, and it worked OK.

After I'd finished the update I uncommented the lines and re-ran apt-get update and it worked fine.