6

I im trying to do

sudo apt-get update

but i get the following error:

W: Failed to fetch http://ftp.udc.es/ubuntu/dists/trusty/Release  Unable to find   expected entry 'main/binary-x8-64/Packages' in Release file (Wrong sources.list entry or malformed file)

I have tried resetting the /etc/apt/sources.list like is here suggested:

How do I restore the default repositories?

And also tried to select another server from which to download the updates: 'sudo apt-get update' error on Ubuntu 12.04

But I keep getting the same damned error message. Any ideas?

As asked in comment, doing:

$ grep -R ftp.udc.es /etc/apt/sources.list*
/etc/apt/sources.list:deb http://ftp.udc.es/ubuntu/ trusty main universe
/etc/apt/sources.list.save:deb http://ftp.udc.es/ubuntu/ trusty main

$ cat sources.list
## See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
deb http://ftp.udc.es/ubuntu/ trusty main universe
# CDROMs are managed through the apt-cdrom tool.

$ dpkg --print-architecture 
amd64
$ dpkg --print-foreign-architectures
i386 
x8664
x8-64
x864
gmm
  • 162

3 Answers3

6

As can be seen from the output of dpkg --print-foreign-architectures, you have a bunch of invalid architectures added, for some reason. Remove them:

sudo dpkg --remove-architecture x8664
sudo dpkg --remove-architecture x8-64
sudo dpkg --remove-architecture x864

In future, do check what you're adding.

muru
  • 207,228
2

Try adding these to your /etc/apt/sources.list . These are the us repositories.

deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted

deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe

deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.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

deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

you might get the error because Canonical has deprecated 14.04 ( before being blessed LTS) . If you are not on LTS then you should upgrade to 14.04.01 LTS.

You do that by running sudo do-release-upgrade

0

Go to Software and Update, and in Ubuntu Software tab, change the download location to Select best server. It will update the cache and after that, youer done. Then try apt-get update.

Jens Erat
  • 5,131
  • 7
  • 33
  • 37
Sushil
  • 1