9

I dusted off a Pi 1, which is armv6, then installed Raspbian on it. The base OS works, but many of the packages I install won't even start- they say illegal instruction. That's because the armhf binary packages are being installed, which isn't compatible with the Pi1.

Here's an example, looking at vim-common in apt show:

...
Download-Size: 339 kB
APT-Manual-Installed: yes
APT-Sources: http://mirrordirector.raspbian.org/raspbian stable/main armhf Packages
Description: Vi IMproved - enhanced vi editor - compact version

Aside from installing an ancient kernel, how do I tell apt to not install the 'wrong' version of the binaries?

Here's what my sources.list contains (in part). Nowhere does it say armv6, armv7, armel, or armhf.

$ cat /etc/apt/sources.list.d/archive_raspbian_org_raspbian.list deb https://archive.raspbian.org/raspbian jessie main contrib non-free deb-src https://archive.raspbian.org/raspbian jessie main contrib non-free

6
  • I'm not sure I understand. As far as I am aware Raspbian will run okay on all Pis. I don't have any problems with my original Pi B (the first model).
    – joan
    Jul 25, 2018 at 19:57
  • The original Pi B is armel only, I think. To compare Pis, what does dpkg --print-architecture say on your Pi1B?
    – tedder42
    Jul 25, 2018 at 20:11
  • I used to use armel as that was all that Debian supported. I now use armhf which is what is reported. Remember that the whole raison d'être of Raspbian was to provide armhf.
    – joan
    Jul 25, 2018 at 20:36
  • Sure, but .. the Zero and Pi1 don't grok armhf. Hence the question.
    – tedder42
    Jul 25, 2018 at 22:59
  • @tedder42 - Sorry, you are absolutely wrong. The Zero and Pi1 absolutely do grok armhf - I have 776 packages installed on my original (256MB) Pi1 - 385 of them include :armhf in the package name, the other 391 are not CPU specific, that leaves ZERO that are :armel - similar results for a ZeroW - read raspberrypi.org/forums/viewtopic.php?t=80566 and you'll see all Pi grok armhf Jul 25, 2018 at 23:40

1 Answer 1

25

Both Raspbian and Debian pride themselves in suppporting the "armhf" architecture. Of course, they mean two different things !

  • Raspbian "armhf": ARMv6 + VFPv2
  • Debian "armhf": ARMv7

Your scenario is impossible without mixing debian.org and raspbian.org/raspberrypi.org packages. You must have mixed those repositories in the past or are still using mixed up repositories.

Check the output of

apt-cache policy name-of-offending-package

Raspbian "armhf" has always worked on any Raspberry Pi. Debian "armhf" only works on newer Pis with ARMv7 CPU (first released ~ 2015).

2
  • that totally explains it! I couldn't figure out the armhf weirdness. I was bootstrapping in the debian packages. I was including deb.debian.org/debian and archive.raspberrypi.org/debian; I assume both need to go?
    – tedder42
    Jul 27, 2018 at 2:16
  • debian.org must go. debian.org repos are considered harmful for Raspbian systems ;) raspbian.org/raspberrypi.org are fine, even if it says "armhf"
    – flakeshake
    Jul 27, 2018 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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