View Full Version : [SOLVED] ubuntu server 14.04. apt-get install results in Hash Sum Mismatch
amalgamas
September 7th, 2014, 04:42 PM
I have been trying to correct a «Failed to fetch... Hash Sum Mismatch»-error for the last couple of days. I have tried every suggestion that I could find in forums and on google, including:
sudo fuser -vvv /var/lib/dpkg/lock
sudo rm /var/lib/apt/lists/lock
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo rm /var/cache/apt/*.bin
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo apt-get clean
LANG=C;sudo apt-get autoclean
LANG=C;sudo apt-get --purge autoremove
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo apt-get -f install
LANG=C;sudo apt-get --fix-missing install
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
Nothing helps. Now what? Should I give up and reinstall?
Any advice will be appreciated
Bashing-om
September 7th, 2014, 10:40 PM
amalgamas; Hi !
Maybe as a thought, one should focus attention on that single package rather than the system as a whole ?
Could be a lot of trouble, but ?
cat /var/lib/dpkg/info/<package_name>.md5sums
list of MD5 hash values for files installed by the package. The installation of debsums enables verification of installed package files against MD5sum values in the this file.
Then one-by-one check the md5sum of each file ?
Unfortunately, I have been unable to complete my thought, as I have not found a means to find the hash value of a given original source file off-system.
Will continue to look for that means as I would think that the md5sum for 'files' would also be available as for the hash value of the complete .iso file.
a thought worth putting more time in on
amalgamas
September 8th, 2014, 06:40 AM
Thank you for your reply!
Of course, if here is a way to find the correct checksum, I could check and manually reinstall single files each time I run into this.
But I wonder: is it worth it. Reinstall of the complete system is a lot of hassle, may be it is worth it. But do I have any guarantee that it will be better afterwards?
Best regards
Bashing-om
September 8th, 2014, 05:22 PM
amalgamas; Welp;
I am a firm believer in directly addressing a issue by fixing the cause.
Still looking for a link to the original source md5sums. I would think they are available somehow, someway.
Verifying these md5sums I would think is the place to start. But, my Google-fu is presently failing me.
where there is a will there is a way
amalgamas
September 29th, 2014, 07:15 PM
Ok, so I took the box home from my office, backed up the home directory and reinstalled Ubuntu server 14.04.
Everything worked fine, I updated and upgraded and installed a lot of stuff (LibreOffice, gnote ++) and kept the box at home fer a few days. The dreaded “hash sum mismatch” error did not show up.
Today I took it back to the office and hooked it into the office network. After a few network tweaks and installations (cups, gnome-printer service) the error showed up again preventing me from installing further programs.
I immediately took it home again, hooked it up did an update and was able to install the software without the “hash sum mismatch” error. I am still testing it at home, no error.
Here are the data I can provide:
Home:
DHCP, cable network, my home ISP
Work:
Static ip, cable network, my work ISP (different from home ISP), the DNS nameservers are: #1: Local win 2012 server; #2: ISP nameserver 1
I did not change repos or mirrors. I also did not delete /var/lib/apt/lists or do any other of the many suggestions one can find on the web. The PC was the same in both situastions (DELL Poweredge T110). In short: I only changed network setup to match the office networkor my private network. The network was set up by editing the /etc/network/interfaces file:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto em1
iface em1 inet dhcp
#iface em1 inet static
# address 192.168.90.10
# gateway 192.168.90.1
# netmask 255.255.255.0
# network 192.168.90.0
# broadcast 192.168.90.255
# dns-nameservers <ip of windows 2012 server> <dns1 from ISP provider>
(I commented out line 10 and uncommented lines 12 – 18 for static ip at work)
and confirmed by inspecting /etc/resolv.conf and pinging external ip addresses.
Something obviously is wrong and I would appreciate suggestions on how to get rid of this. It prevents my Ubuntu server from being of any use at work.
Bashing-om
September 29th, 2014, 08:14 PM
amalgamas; Well.
above my skill level now, but I would think that the Windows' machine to be acting as a proxy server.
Might try changing "dns-nameservers" in '/etc/network/interfaces' to Google's name server(s) - 8.8.8.8 , 8.8.4.4 and see if you can still get out.
there are those things
I do not know
amalgamas
October 4th, 2014, 07:48 PM
Still not solved!
I did what was suggested, kept the server at home, checked everything I could think of, installed some software, ran update – upgrade. Everything without any error messages.
To day I took the machine back to the office, set it up with google DNS (8.8.8.8 8.8.4.4), but after some time I got the dreaded error message: “Hash Sum Mismatch”. I disconnected the machine and took it home again, and guess what: no error message (still with google DNS).
Now I don't really know where to proceed. I do not know of any problems with our office network. There is no proxy and all windows PCs work correctly. Next step will be to take an ubuntu laptop of mine to the office hook it up with the same network configuration as the server and test whether I get the error message with it.
Any advice will be appreciated, please help!
cariboo
October 6th, 2014, 05:08 AM
It looks to me that the problem originates in your office network, is there any way you can connect it directly to the router, to eliminate the rest of the office network?
CharlesA
October 6th, 2014, 05:20 AM
It looks to me that the problem originates in your office network, is there any way you can connect it directly to the router, to eliminate the rest of the office network?
That would be the next step tbh.
There could be something on the network that is messing with the files as they are being downloaded too.
amalgamas
October 6th, 2014, 06:34 AM
But, if there is something wrong with the office network, why should that give this error? What is this "Hash sum mismatch..." thing anyway?
I will test this as soon as possible. Coming back with results
Edit: I have forgotten to mention that this came after the upgrade to 14.04. Before this the server ran for two years without any issues under 12.04. Nothing in the office network has been changed
CharlesA
October 6th, 2014, 07:48 AM
See here: http://askubuntu.com/questions/41605/trouble-downloading-updates-due-to-a-hash-sum-mismatch-error
Try using a different mirror.
amalgamas
October 6th, 2014, 09:50 AM
Just now I ran some tests with my laptop, ubuntu 14.04. Hooked it up to the office network with the same parameters as the server using network manager. The server was set up with command line parameters. No errors. I ran all tests I could think of (installing, removing, reinstalling, update, upgrade...). Tomorrow I will try some more with the server.
Another mirror? I have tried that.
matt_symes
October 6th, 2014, 09:57 AM
Hi
What caching does your work have ? What caching does your works ISP have ?
Kind regards
amalgamas
October 23rd, 2014, 09:46 PM
Update on this: the hash-sum mismatch error turns up from time to time, then disappears and everything works well. There is probably something wrong in our network, but I have not been able to pin down the error yet.
Strange thing is that our windows 7 machines do not seem to have any problems with this, all updates seem to work nicely.
cariboo
October 25th, 2014, 03:18 AM
Just out of curiosity, what mirror are you using? If you aren't using one that updates right away, this could be the reason for the error.
amalgamas
February 4th, 2015, 10:33 AM
This is now an old thread. But I think I have solved the mystery.
My IPS finally agreed to give me a new router that was more configurable. I set DNS to google's (8.8.8.8 and 8.8.4.4), then set the whole network to use the router as DNS server.
This seems to have solved the problem. I developed a test (forced reinstall of the Chromium browser) which consistently failed while upgrades failed only on an irregular basis. Now the Chromium reinstall works.
Thank you for your support, it gives me hope for the future
Bashing-om
February 4th, 2015, 10:05 PM
amalgamas; Great;
No more sweating this one.
Thanks for providing the cause and the solution.
If this matter is now concluded;
Please mark this thread solved;
aides others seeking the solution,
helps keep the forum clean and
precludes others miss-directing efforts to aid.
https://wiki.ubuntu.com/UnansweredPostsTeam/SolvedThreads
happy trails to you
amalgamas
February 5th, 2015, 07:19 AM
Marked as solved (even if I wanted to wait for a while just to make sure...)
Bashing-om
February 5th, 2015, 06:05 PM
amalgamas; Hey ;
Marked as solved (even if I wanted to wait for a while just to make sure...)
If there is a continued issue, you can remark this thread. Even as marked 'solved' - If there is a new entry in this thread, I will see it and respond.
good things do happen
gacb
February 11th, 2015, 07:39 PM
Some kind soul posted this fix on AskUbuntu:
sudo rm -fR /var/lib/apt/lists/*
It will take you to another command prompt and you should be able to run apt-get update normally. It worked for me.
Bashing-om
February 11th, 2015, 10:16 PM
Agreed, the control files can become corrupted, or contain misleading information.
There are those times that removing these files, and rebuilding the data base resolves the situation.
always best to know the why
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.