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

300D7309EF17
  • 1,372
  • 1
  • 11
  • 17
  • 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 '18 at 19:57
  • The original Pi B is armel only, I think. To compare Pis, what does dpkg --print-architecture say on your Pi1B? – 300D7309EF17 Jul 25 '18 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 '18 at 20:36
  • Sure, but .. the Zero and Pi1 don't grok armhf. Hence the question. – 300D7309EF17 Jul 25 '18 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 https://www.raspberrypi.org/forums/viewtopic.php?t=80566 and you'll see all Pi grok armhf – Jaromanda X Jul 25 '18 at 23:40
  • to use your example of vim ... look here - absolutely no armel versions of vim even exist in the raspbian apt repository – Jaromanda X Jul 25 '18 at 23:47

1 Answers1

26

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).

flakeshake
  • 6,235
  • 1
  • 14
  • 33
  • 1
    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? – 300D7309EF17 Jul 27 '18 at 02: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 '18 at 07:57