Re: [APT] how to debug "Hash Sum mismatch"?
On Sat, Jan 26, 2013 at 12:45:30PM -0500, Tom Roche wrote:
> > Without knowing all your details, I'd probably:
>
> > rm /var/lib/apt/lists/*
>
> > rm /var/lib/apt/lists/partial/*
>
> > then try updating again.
>
> Unfortunately, no fix:
>
> me@it:~ $ sudo rm /var/lib/apt/lists/*
> rm: cannot remove `/var/lib/apt/lists/partial': Is a directory
> me@it:~ $ sudo rm /var/lib/apt/lists/partial/*
> me@it:~ $ sudo emacs -nw -q /etc/apt/sources.list
> me@it:~ $ sudo aptitude update
> ...
> W: Failed to fetch bzip2:/var/lib/apt/lists/partial/lib.stat.cmu.edu_R_CRAN_bin_linux_debian_squeeze-cran_Packages: Hash Sum mismatch
> E: Some index files failed to download. They have been ignored, or old ones used instead.
> E: Couldn't rebuild package cache
[...]
> me@it:~ $ sudo rm /var/lib/apt/lists/partial/* ; sudo rm /var/lib/apt/lists/* ; sudo apt-get update
> Reading package lists... Done
Now try apt-get upgrade.
> me@it:~ $ sudo aptitude install r-base r-base-core r-recommended r-base-dev liblapack3 liblapack-dev
> The following NEW packages will be installed:
> r-base-dev
> The following packages will be upgraded:
> r-base r-base-core r-recommended
> 3 packages upgraded, 1 newly installed, 0 to remove and 1603 not upgraded.
^^^^^^^^^^^^^^^^^
Is there a reason for not
upgrading all those
packages?
> Need to get 21.1 MB of archives. After unpacking 500 kB will be used.
> Do you want to continue? [Y/n/?]
> Get: 1 http://mirrors.nics.utk.edu/cran/bin/linux/debian/ squeeze-cran/ r-base-core 2.15.2-1~squeezecran.0 [21.0 MB]
> Get: 2 http://mirrors.nics.utk.edu/cran/bin/linux/debian/ squeeze-cran/ r-base 2.15.2-1~squeezecran.0 [37.1 kB]
> Get: 3 http://mirrors.nics.utk.edu/cran/bin/linux/debian/ squeeze-cran/ r-recommended 2.15.2-1~squeezecran.0 [2,688 B]
> Get: 4 http://mirrors.nics.utk.edu/cran/bin/linux/debian/ squeeze-cran/ r-base-dev 2.15.2-1~squeezecran.0 [3,906 B]
> Fetched 21.1 MB in 12s (1,650 kB/s)
>
> E: Failed to fetch http://mirrors.nics.utk.edu/cran/bin/linux/debian/squeeze-cran/r-base-core_2.15.2-1~squeezecran.0_amd64.deb: Hash Sum mismatch
>
> What else to try?
First, happens when you do "apt-get update && apt-get upgrade"
Just a wild stab in the dark, is bzip2 installed :)
(apt-cache policy bzip2)
There are also plenty of hits on google for:
W: Failed to fetch bzip2: Hash Sum mismatch
This link (https://answers.launchpad.net/ubuntu/+question/6841) suggests:
rm /var/cache/apt/pkgcache.bin
rm /var/cache/apt/srcpkgcache.bin
These should be regenerated with an apt-get update command.
And you are only having trouble with the CRAN repositories?
--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X
Reply to: