0

Original Question

I had a problem as follows:

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.

Then I found this answer. Followed the steps:

sudo -i
echo "deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse" > /etc/apt/sources.list

then executed sudo apt-get update and found the problem:

Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty Release.gpg [72 B]
Get:2 http://archive.ubuntu.com trusty Release [11.9 kB]
Get:3 http://archive.ubuntu.com trusty/main i386 Packages [14 B]
Fetched 12.0 kB in 0s (22.7 kB/s)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'universe/binary-i386/Packages' 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.

and I found enter image description here

Please tell me how to solve it ?

Update after Neil's answer:

Following problem occurs

enter image description here

  • Follow these instructions to create a new repository for your system: http://askubuntu.com/a/192388/231142 – Terrance Jan 30 '16 at 05:32
  • @Terrance thanks for replying, one update: I found that in "Software & Updates" under "Ubuntu Software" tab "download location" was changed, when I revert back it in its original settings then I found the entries in Other Software tab are restored. But the first problem exists i.e. 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. – Soumyadip Das Jan 30 '16 at 05:35
  • You can maybe create a whole new one by going to https://repogen.simplylinux.ch/ then select your country and distro. Select your branches and updates, then it should give you a way to get a new sources.list file. – Terrance Jan 30 '16 at 05:38

1 Answers1

0

You have to remove the corrupted source file and add it back with software-properties-gtk Do this by pressing pressing Ctrl+Alt +T

sudo rm -f /etc/apt/*
sudo rm -f /etc/apt/sources.list.d/*
sudo rm -f /etc/apt/apt.conf.d/*

Then run

sudo software-properties-gtk

Tick the boxes, change the server to US or to any other server of your choice, then click close.

enter image description here

enter image description here

Then click reload.

Wait for it to finish then run:

sudo apt-get update
Neil
  • 4,475
  • 3
  • 22
  • 34
  • During this relode operation I found 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. – Soumyadip Das Jan 30 '16 at 08:04
  • updated my question, please check – Soumyadip Das Jan 30 '16 at 08:54
  • Please note: there is no internet connection problem and I am not able to install new software from software center :( – Soumyadip Das Jan 30 '16 at 08:57
  • the problem is not solved till date :( – Soumyadip Das Feb 09 '16 at 05:28
  • @SoumyadipDas updated my answer. sorry for the very slow replay. – Neil Feb 09 '16 at 05:53
  • Update on 22 Feb 2017: For the last 6/7 months I didn't faced this problem. I guess its was some temporary problem and solved automatically. – Soumyadip Das Feb 22 '17 at 16:54