Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a freshly installed Ubuntu Karmic 32 bits installed in an old machine (Pentium 4 512 Mb RAM) and I'm having a severe problem with apt-get. No matter what repository I choose, I can't update the repository files. I get the following error during a apt-get update:

Hit http://br.archive.ubuntu.com karmic-updates/universe Sources                                                                       
Hit http://br.archive.ubuntu.com karmic-updates/multiverse Packages                                                                    
Hit http://br.archive.ubuntu.com karmic-updates/multiverse Sources                                                                     
96% [4 Sources bzip2 10792960]                                                                                                    120kB/s 2s
bzip2: 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://br.archive.ubuntu.com karmic/universe Sources                                                                                    
 Sub-process /bin/bzip2 returned an error code (2)
 Downloaded 7920kB em 58s    (136kB/s)                                                                                                            
 W: Failed while searching http://br.archive.ubuntu.com/ubuntu/dists/karmic/universe/binary-i386/Packages.bz2  Sub-process /bin/bzip2 returned an error code (2)

I have another computer in the same network that is perfectly able do download those files and update it's package database.

Also, when I try to install any package with apt-get I get a "incorrect hash sum". For example, trying to install vim I get the following error:

E: Failed retrieving http://br.archive.ubuntu.com/ubuntu/pool/main/v/vim/vim-runtime_7.2.245-2ubuntu2_all.deb: incorrect Hash Sum

Again: I have a computer in the same network that can install any package normally, so it's not a local network problem.

Does anyone have any clue in what can be happening? I tried many different repositories.

I also had a problem installing Grub in this machine (had to resort to LILO, cause Grub wouldn't install). Can this be a hardware problem (my hard disk failing to write?) ?


New facts:

I tested the memory with the standard test that comes in the ubuntu cd and everything is ok. I also tested the hard drive with e2fsck -c and apparently there is no problem.

Really don't know what it could be. I had windows XP installed in this machine and had a similar problem: everytime I was downloading some installation file I had to do it many times until it worked. In windows it seemed that the problem happened only when it tried to access a temporary downloaded file. (i.e., when some app installer had to get some of it's files on the web).

Maybe network problem? But I had simultaneously another computer (my notebook) in the same network, with the same version of Ubuntu and the repositories where downloading everything perfectly.

share|improve this question
    
I see you put this up on Ubuntuforums. Please let us know if you find an answer. :o) ubuntuforums.org/showthread.php?t=1391108 –  Iain Jan 26 '10 at 20:01
    
Changed RAM, still have the same problem. Not a RAM problem. –  Rafael S. Calsaverini Jan 27 '10 at 16:25
    
have you tried copying files from the laptop to the problem computer? via SCP or USB thumbdrive or whatever? Ubuntu stores packages it's installed in /var/cache/apt/archives –  quack quixote Jan 28 '10 at 15:43
    
It turned out that the problem was the specific port in the hub where the computer was connected. It took us weeks to find this out cause we have no access to the hub, and the network cable is nailed to the wall (why??? don't ask me...). –  Rafael S. Calsaverini Feb 9 '10 at 12:01

2 Answers 2

It could also be a problem with your network card, if downloads don't work on Windows either. Or even in the network cable, though that seems less likely. Try switching those around?

share|improve this answer
1  
or a bad port on the switch/router it's connected to, for that matter. –  quack quixote Jan 28 '10 at 15:43
    
In case it's a network problem, is there a way I can test it? Somehow to test if some package I've sent is coming back corrupted? –  Rafael S. Calsaverini Jan 28 '10 at 16:37
1  
Sure, one thing to try is to download something where you can see its checksum... packages.debian.org/lenny/alpha/openssl/download Download the linked file, then run md5sum /path/to/file.deb in the same directory, to make sure it matches the md5sum on the web page. Try this a few times, to see if it matches each time. –  rescdsk Jan 28 '10 at 21:46

This may be a harddisk failure but it is more likely RAM-caused errors. All Ubuntu installations have a memtest86+ boot entry, so it'll be easy to check this. Also try booting in recovery mode and running full fsck: if some files were corrupted fsck will tell it.

If none of the above will give any positive result, you can install badblocks package (from .deb copied on USB drive) and test full disk surface for errors.

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.