3
sudo apt-get update

returns some erors :

W: Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/trusty/Release Unable to find expected entry 'restricted/source/Sources' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages Hash Sum mismatch

W: Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/trusty-security/universe/binary-amd64/Packages Hash Sum mismatch

W: Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/trusty-security/main/binary-i386/Packages Hash Sum mismatch

W: Failed to fetch http:// archive.ubuntu.com/ubuntu/dists/trusty-security/main/i18n/Translation-en Hash Sum mismatch

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

it seems to happen with the ubuntu official repo. Any idea why ?

For information, my sources.list is the following :

#----------------------------------------------------------#
#      OFFICIAL UBUNTU REPO                                #
#----------------------------------------------------------#


###### Ubuntu Main Repos
deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse

###### Ubuntu Update Repos
deb http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

#------------------------------------------------------------------------------#
#                           UNOFFICIAL UBUNTU REPOS                            #
#------------------------------------------------------------------------------#


###### 3rd Party Binary Repos

#### MongoDB - http://www.mongodb.org/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
3

The problem may comes from your /etc/resolv.conf file, check if you have some nameserver directives on it and try to ping archive.ubuntu.com

Here is my resolv.conf :

domain local
search local

nameserver 8.8.8.8
nameserver 8.8.4.4

I use Google's public dns (https://developers.google.com/speed/public-dns/)

Then try apt-get update

  • For precision's sake, i didnt directly edited the resolv.conf file because, as mentionned on the top line for ubuntu14.04, this would have been overriden. I instead edited etc/resolvconf/resolv.conf.d/head then run the command sudo resolvconf -u – Laurent Demouge Aug 28 '15 at 10:41
  • I have looked for this solution across the internet, your way was the best, fastest and easiest. it is much appreciated from a very new linux guy – user350563 Apr 20 '16 at 22:20
1

It detected some files it got were outdated or corrupted, so they were unusable. Remove cached files by rm -rf /var/lib/apt/lists/* and try again apt-get update.

If the problem persists, maybe a caching proxy somewhere are still holding old or broken content. apt-get update -o Acquire::http::No-Cache=True might help in this case.

0

Try your local/nearest Ubuntu mirror. I tested US DE FR mirrors and they all failed. Changing to the local mirror solved the problem.

0

Are you behind proxy? If yes then you have to go to /etc/apt/apt.conf file and modify that file as follows.

Acquire::http::proxy "http://username:password@proxyaddress:portnumber/";
Acquire::https::proxy "https://username:password@proxyaddress:8080/";
0

I was having the same problem, but the only solution work out in this problem for me is:

Backup your sources list sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

Open the sources file /etc/apt/sources.list and rename all the instances of us.archive from

http://us.archive.ubuntu.com/ubuntu/

to

http://old-releases.ubuntu.com/ubuntu/

Run sudo apt-get update after that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.