I am unable to install packages via apt-get. So, I tried apt-get update.
# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'vim' has no installation candidate
# apt-get update
Hit http://security.debian.org jessie/updates InRelease
Ign http://httpredir.debian.org jessie InRelease
Hit http://security.debian.org jessie/updates/main Sources
Hit http://httpredir.debian.org jessie-updates InRelease
Hit http://security.debian.org jessie/updates/main amd64 Packages
Hit http://security.debian.org jessie/updates/main Translation-en
Get:1 http://httpredir.debian.org jessie-updates/main Translation-en/DiffIndex [736 B]
Hit http://httpredir.debian.org jessie Release.gpg
Get:2 http://httpredir.debian.org jessie-updates/main Sources [1959 B]
Err http://httpredir.debian.org jessie-updates/main Sources
Get:3 http://httpredir.debian.org jessie-updates/main amd64 Packages [1963 B]
Hit http://httpredir.debian.org jessie Release
Get:4 http://httpredir.debian.org jessie/main Translation-en [4582 kB]
Get:5 http://httpredir.debian.org jessie/main Sources [1961 B]
Err http://httpredir.debian.org jessie/main Sources
Get:6 http://httpredir.debian.org jessie/main amd64 Packages [1961 B]
Err http://httpredir.debian.org jessie/main amd64 Packages
Fetched 4591 kB in 14s (327 kB/s)
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/source/Sources Hash Sum mismatch
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/main/source/Sources Hash Sum mismatch
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
I have already tried the accepted answer here: debian apt packages hash sum mismatch
I am naive but I believe it is httpredir.debian.org which is causing the problem. How can I update /etc/apt/sources.list? What alternative entries could I use?
For now, I edited /etc/apt/sources.list and updated it with a new mirror which solved the primary issue of not being able to find a candidate package.
This is related to some sort of bizzare network issue (perhaps router related?), I connected my laptop through another network connection (namely tethering through the smart phone) and apt-get update started working. Wouldn't have believed it if I hadn't seen it with my eyes, etc...
Not to be mystical about it, What I'm saying in short is check your internet connection, maybe try another connection, your update is accessing a lot of package sites, some of them might be filtered for some reason or other, check the URL's for the ones causing problems.
And as a rule of thumb I wouldn't mess with my sources.list unless I knew extremely well what I was doing and that only through the given tools, most often that wouldn't come in the sources.list but in the .d. folder somewhere down the line so it won't override any dependencies and cause problems down at the package tree trunk. And allways keep your apt-get update working or you'll lose the ability to keep your system in sync.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With