[Troubleshooting] apt-get error problem Ubuntu 12.04 and 14.04
How to fix some of the common errors encountered using ubuntu, if you get an error similar yet, please post immediately comment in this article, we will fix to you immediately.
1. Hash Sum mismatch:
W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_universe_source_Sources Hash Sum mismatchFix:
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_multiverse_binary-amd64_Packages Hash Sum mismatchE: Some index files failed to download. They have been ignored, or old ones used instead.
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get clean
sudo apt-get update
2. Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages
W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_universe_source_Sources Hash Sum mismatchW: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.15 80]E: Some index files failed to download. They have been ignored, or old ones used instead.Fix
Change mirror for Ubuntu:
nano /etc/apt/sources.listand replace all these lines:
http://us.archive.ubuntu.com/ubuntu/by
http://archive.ubuntu.com/ubuntu/3. Another process using it
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)Fix
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
sudo rm /var/lib/apt/lists/lock
sudo rm -f /var/lib/dpkg/lock
sudo rm -f /var/cache/apt/archives/lock
4. Apache Error while restarting (Ubuntu 14.04):
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using mail1.chungkol.com. Set the 'ServerName' directive globally to suppress this messageFix
sudo nano security.conf
Add these line into end of that file:
ServerName localhost