debian apt-get or aptitude update Hash Sum mismatch

The site moved to root domain where all post are imported. Please go to http://pusheax.com/

We need “apt-get update” to update the debian source list if we want to upgrade debian to next release. When i was going to upgrade debian , i got error “Hash Sum mismatch” something like:

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/mirrors.yourmirror.com_debian_dists_wheezy_main_i18n_Translation-en  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

It happened for several times in the past, Today, when i was going to upgrade debian 7 to 7.1.0 i got this error again.

Anyway, It happened for the package server. So i decide to change the server address from the sources.list . To select fast server i used “netselect-apt” :

apt-get install netselect-apt && cd /etc/apt/ && netselect-apt -n wheezy -o sources.list

This command will install the netselect-apt and find the fast server then replace the old sources.list. It will output like:

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Duplicate address 64.50.233.100 (http://64.50.233.100/debian/, http://ftp-nyc.osuosl.org/debian/); keeping only under first name.
netselect: 43 (23 active) nameserver request(s)...
Duplicate address 128.30.2.36 (http://128.30.2.36/debian/, http://debian.lcs.mit.edu/debian/); keeping only under first name.
netselect: unknown host debian.comu.edu.tr
netselect: 17 (17 active) nameserver request(s)...
Duplicate address 128.61.240.89 (http://128.61.240.89/debian/, http://debian.gtisc.gatech.edu/debian/); keeping only under first name.
Running netselect to choose 10 out of 398 addresses.
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
The fastest 10 servers seem to be:

http://mirror.positive-internet.com/debian/
http://mirror.0x.sg/debian/

http://mirror.sov.uk.goscomb.net/debian/
http://mirror.vorboss.net/debian/
http://archive.mmu.edu.my/debian/
http://debian.mirrors.ovh.net/debian/
http://ukdebian.mirror.anlx.net/debian/
http://ukdebian.mirror.anlx.net/debian/
http://opensource.nchc.org.tw/debian/

Of the hosts tested we choose the fastest valid for HTTP:
http://mirror.0x.sg/debian/

Writing netselect-apt.list.
Done.

You can exclude your local server and replace with working fast server if netselect-apt selecting the same server for you.

Hope this post will help someone!

2 Replies to “debian apt-get or aptitude update Hash Sum mismatch”

Leave a Reply

Your email address will not be published. Required fields are marked *