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
7
  • It doesnt return anything...
    – gmm
    Feb 26, 2015 at 15:59
  • Odd. I think the error is actually because x8-64 isn't a valid architecture option for Debian repositories, yet your sources seem to use it. What about grep -R ftp.udc.es /etc/apt/sources.list*?
    – muru
    Feb 26, 2015 at 16:02
  • pastebin the contents of /etc/apt/sources.list so we can check the syntax.
    – Panther
    Feb 26, 2015 at 16:03
  • I put both things in the question since its not too big
    – gmm
    Feb 26, 2015 at 16:07
  • And dpkg --print-architecture; dpkg --print-foreign-architectures as well, please.
    – muru
    Feb 26, 2015 at 16:10

3 Answers 3

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.

0
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

11
  • Im at 14.04.01, sorry. i did the command that you suggested anyway and got: Checking for a new Ubuntu release No new release found
    – gmm
    Feb 26, 2015 at 15:56
  • Can you try this on plain command line: curl http://ftp.udc.es/ubuntu/dists/trusty/Release
    – user283885
    Feb 26, 2015 at 15:58
  • I did it but update keeps failing
    – gmm
    Feb 26, 2015 at 16:00
  • I'm asking if curl says 404 page not found? I'm trying to see if your IP is not blocked. The repo is accessible from this side of the world.
    – user283885
    Feb 26, 2015 at 16:01
  • 1
    No it doesnt, it returns the MD5 sum, a number and the name
    – gmm
    Feb 26, 2015 at 16:03
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .