When I run sudo apt-get update I get the following error:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.15 80]

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

I've tried looking in /etc/apt/sources.list.d/ to see if anything in that directory can be removed but all that is in there is

nodesource.list
nodesource.list.save

In my sources.list file I have:

deb http://ports.ubuntu.com/ubuntu-ports/ trusty main
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main
deb http://archive.ubuntu.com/ubuntu trusty main
# deb-src http://archive.ubuntu.com/ubuntu trusty main

Can anyone recommend a way of fixing this error?

  • Looks like there is a malformed line in the /etc/apt/sources.list file. You may want to post it for review. – mikewhatever Dec 4 '15 at 15:09
  • Thanks @mikewhatever I've edited my question with the contents of sources.list – henrywright Dec 4 '15 at 15:10
  • The last two lines don't belong there. They are for x86 packages, and don't have armf versions. – mikewhatever Dec 4 '15 at 15:11
  • @mikewhatever removing those two seems to have fixed the error. If you want to add an answer I can give you some credit? – henrywright Dec 4 '15 at 15:13
  • 1
    @henrywright All done. Glad it helped. – mikewhatever Dec 4 '15 at 16:43
up vote 0 down vote accepted

The offending line was from the x86 source list. Removing it eliminated the error. The following is the correct list for armf architecture.

deb http://ports.ubuntu.com/ubuntu-ports/ trusty main
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main

You might install the armhf cross tools which add armhf as foreign architecture (your architecture maybe i386 or amd64). You can launch this command to verify:

dpkg --print-foreign-architectures

If the output includes armhf, you can simply remove it by running the command:

sudo dpkg --remove-architecture armhf

Finally, launch your sudo apt-get update again.

  • armhf is my architecture actually so dpkg --print-foreign-architectures outputs nothing. – henrywright Dec 4 '15 at 15:17
  • OK, your question didn't mention that :) – Tung Tran Dec 4 '15 at 15:19
  • Sorry, thanks for the answer though, it's certainly useful. +1 from me! – henrywright Dec 4 '15 at 15:25

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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