Dec 042010
 

I was trying to use the Knowledgetree automated installer on a fresh install of Ubuntu 10.04.01 64-bit server. While trying to install, I received an error about swftools, which I was able to install thanks to the directions here (in post 2):
http://forums.knowledgetree.org/viewtopic.php?f=6&t=20633

However, I then received an error that read:
Failed to fetch http://repos.zend.com/zend-server/deb/dists/server/non-free/binary-amd64/Packages.bz2 Hash Sum mismatch
Followed by a few zend packages that couldn’t be installed.

After much purging and googling, I found that this worked well:

  1. Go to /var/lib/apt/lists/partial/ and delete the files that failed to download. (If you are curious, I looked at the file that was supposed to be correct in the partial directory, and noticed it was encoded still. I suspect an incorrectly expanded archive file that was causing the problem. Some people reported that simply deleting these files fixed the problem, but it did not help for me.)
  2. Using the root URL of the repo that had the hash problem….go to the site. So for me it is http://repos.zend.com/zend-server/deb/dists/server/non-free/binary-amd64/
    • Here I noticed that there were a number of files that had the packages. The file it failed on was the bz2 file, however, there is a plain text one available called Packages
    • I clicked on Packages and copied all of the text.
    • On the server, I created a new file in the /var/lib/apt/lists/ directory with the same name of the file that failed/was encoded in the partial directory (sudo vim repos.zend.com_zend-server_deb_dists_server_non-free_binary-amd64_Packages) and pasted all of the text in there.
  3. Then I ran apt-get update and it ran without errors.
  4. Finally, I ran the Knowledgetree install again, and it downloaded all of the required packages fine.

I imagine this would work on any repo that is having a similar problem with Hash Sum mismatch, but of course the URL you will visit, and the file name you will use will be different.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)