1

I'm constantly getting a error and a warning on the output of apt-get update from yesterday night on my Ubuntu 14.04 64 bit PC.

The significant part of the output of command apt-get update is following:

Get:1 http://security.ubuntu.com trusty-security InRelease [64.4 kB]
  ...
W: Failed to fetch http://in.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)

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

Also the contents of /etc/apt/sources.list is following:

#deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty universe
deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

I experimented with the sources.list file yesterday and after some time reinstalled Ubuntu to 14.04. Even after reinstalling I'm seeing this error.

Any help is appreciated. Thanks in advance.

Update 1

After un-checking Unsupported Updates, in Updates tab in software-properties-gtk, the 1st warning was removed. So now I'm getting only following warning and error:

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)

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

Update 2

As suggested by Raphael (see comments), changing the download server in Software and Updates to Best Server solves the problem.

  • 1
    By reinstall do you mean that you formated your drive and reinstalled Ubuntu??? – Raphael Jan 15 '16 at 14:49
  • I had previously installed Ubuntu in 2 partitions: / (root) in /dev/sda2 and /home in /dev/sda4. I formatted the root directory (sda2) and reinstalled Ubuntu 14.04 instead of previous, but kept my /home partition (sda4) and user directory same as before (including user name). – nlern Jan 15 '16 at 14:56
  • You only have two /dev/sda2 and /dev/sda4 ? – Raphael Jan 15 '16 at 14:57
  • Actually I have 4 partitions. In sda1 I installed Windows, in sda3 I reserved swap space. – nlern Jan 15 '16 at 15:02
  • 1
    Your sources.list is absolutely fine. Try changing the server to something else by going to Software & Updates > Server > Other > Select Best Server. – Raphael Jan 15 '16 at 15:17
2

The error may be caused due to server errors. Changing the server tends to solve the issue. To do so, goto:

Software & Updates > Server > Other

and then select the best server

| improve this answer | |

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.