11

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?

5
  • Looks like there is a malformed line in the /etc/apt/sources.list file. You may want to post it for review. Dec 4, 2015 at 15:09
  • Thanks @mikewhatever I've edited my question with the contents of sources.list Dec 4, 2015 at 15:10
  • The last two lines don't belong there. They are for x86 packages, and don't have armf versions. Dec 4, 2015 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? Dec 4, 2015 at 15:13
  • 1
    @henrywright All done. Glad it helped. Dec 4, 2015 at 16:43

2 Answers 2

24

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.

6
  • 3
    armhf is my architecture actually so dpkg --print-foreign-architectures outputs nothing. Dec 4, 2015 at 15:17
  • 1
    OK, your question didn't mention that :)
    – Tung Tran
    Dec 4, 2015 at 15:19
  • Sorry, thanks for the answer though, it's certainly useful. +1 from me! Dec 4, 2015 at 15:25
  • 1
    Woh!! Bravo. This is the solution to my problem. Update is running fine now. Thank you very much
    – GilbertS
    Nov 3, 2020 at 8:19
  • You are welcome. Feel free to upvote my answer. Thanks :)
    – Tung Tran
    Nov 3, 2020 at 8:32
3

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 must log in to answer this question.

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