thin-edge.io
thin-edge.io copied to clipboard
Installation fails on Raspberry Pi Zero W with Raspberry Pi OS Lite
Describe the bug Installation fails on Raspberry Pi Zero W with Raspberry Pi OS Lite
To Reproduce
- Install Raspberry Pi OS Lite using Raspberry Pi Imager
- Setup networking
-
curl -fsSL https://raw.githubusercontent.com/thin-edge/thin-edge.io/main/get-thin-edge_io.sh | sudo sh -s
Expected behavior thin-edge installs without any errors.
Actual behavior
<omitted>
Setting up tedge (0.6.4) . . .
Segmentation fault
dpkg: error processing package tedge (--configure):
installed tedge package post-installation script subprocess returned error exit status 139
Errors were encountered while processing:
tedge
Environment (please complete the following information):
- Raspberry Pi OS Lite (April 4th 2022)
- Raspberry Pi Zero W
- armv61
- thin-edge.io version 0.6.4
We used to have this ticket, regarding armv6. https://github.com/thin-edge/thin-edge.io/issues/161
This is the log of my installation:
pi@raspberrypi:~ $ curl -fsSL https://raw.githubusercontent.com/thin-edge/thin-edge.io/main/get-thin-edge_io.sh | sudo sh -s Thank you for trying thin-edge.io!
Version argument has not been provided, installing latest: 0.7.2
To install a particular version use this script with the version as an argument.
For example: sudo ./get-thin-edge_io.sh 0.7.2
Installing for architecture armhf
Installing mosquitto as prerequirement for thin-edge.io
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libcjson1 libdlt2 libev4 libmosquitto1 libwebsockets16
Suggested packages:
apparmor
The following NEW packages will be installed:
libcjson1 libdlt2 libev4 libmosquitto1 libwebsockets16 mosquitto
0 upgraded, 6 newly installed, 0 to remove and 15 not upgraded.
Need to get 591 kB of archives.
After this operation, 1464 kB of additional disk space will be used.
Get:1 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian bullseye/main armhf libcjson1 armhf 1.7.14-1 [20.8 kB]
Get:2 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian bullseye/main armhf libdlt2 armhf 2.18.6-1 [45.3 kB]
Get:3 http://mirror.de.leaseweb.net/raspbian/raspbian bullseye/main armhf libev4 armhf 1:4.33-1 [38.2 kB]
Get:4 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian bullseye/main armhf libmosquitto1 armhf 2.0.11-1 [83.4 kB]
Get:5 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian bullseye/main armhf libwebsockets16 armhf 4.0.20-2 [161 kB]
Get:6 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian bullseye/main armhf mosquitto armhf 2.0.11-1 [243 kB]
Fetched 591 kB in 1s (401 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package libcjson1:armhf.
(Reading database ... 42376 files and directories currently installed.)
Preparing to unpack .../0-libcjson1_1.7.14-1_armhf.deb ...
Unpacking libcjson1:armhf (1.7.14-1) ...
Selecting previously unselected package libdlt2:armhf.
Preparing to unpack .../1-libdlt2_2.18.6-1_armhf.deb ...
Unpacking libdlt2:armhf (2.18.6-1) ...
Selecting previously unselected package libev4:armhf.
Preparing to unpack .../2-libev4_1%3a4.33-1_armhf.deb ...
Unpacking libev4:armhf (1:4.33-1) ...
Selecting previously unselected package libmosquitto1:armhf.
Preparing to unpack .../3-libmosquitto1_2.0.11-1_armhf.deb ...
Unpacking libmosquitto1:armhf (2.0.11-1) ...
Selecting previously unselected package libwebsockets16:armhf.
Preparing to unpack .../4-libwebsockets16_4.0.20-2_armhf.deb ...
Unpacking libwebsockets16:armhf (4.0.20-2) ...
Selecting previously unselected package mosquitto.
Preparing to unpack .../5-mosquitto_2.0.11-1_armhf.deb ...
Unpacking mosquitto (2.0.11-1) ...
Setting up libmosquitto1:armhf (2.0.11-1) ...
Setting up libev4:armhf (1:4.33-1) ...
Setting up libcjson1:armhf (1.7.14-1) ...
Setting up libdlt2:armhf (2.18.6-1) ...
Setting up libwebsockets16:armhf (4.0.20-2) ...
Setting up mosquitto (2.0.11-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mosquitto.service → /lib/systemd/system/mosquitto.service.
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u2) ...
--2022-06-22 16:10:20-- https://github.com/thin-edge/thin-edge.io/releases/download/0.7.2/tedge_0.7.2_armhf.deb
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/311373685/2108ea61-534c-4201-83a8-84094f823003?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220622%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220622T151020Z&X-Amz-Expires=300&X-Amz-Signature=a3afb5cc8fd085e514f07d7bb77248c1ee3085eafe58e659fcea262a56057858&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=311373685&response-content-disposition=attachment%3B%20filename%3Dtedge_0.7.2_armhf.deb&response-content-type=application%2Foctet-stream [following]
--2022-06-22 16:10:20-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/311373685/2108ea61-534c-4201-83a8-84094f823003?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220622%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220622T151020Z&X-Amz-Expires=300&X-Amz-Signature=a3afb5cc8fd085e514f07d7bb77248c1ee3085eafe58e659fcea262a56057858&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=311373685&response-content-disposition=attachment%3B%20filename%3Dtedge_0.7.2_armhf.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1186200 (1.1M) [application/octet-stream]
Saving to: '/tmp/tedge/tedge_0.7.2_armhf.deb'
tedge_0.7.2_armhf.deb 100%[=================================================================================================>] 1.13M 1.44MB/s in 0.8s
2022-06-22 16:10:22 (1.44 MB/s) - '/tmp/tedge/tedge_0.7.2_armhf.deb' saved [1186200/1186200]
--2022-06-22 16:10:22-- https://github.com/thin-edge/thin-edge.io/releases/download/0.7.2/tedge_mapper_0.7.2_armhf.deb Resolving github.com (github.com)... 140.82.121.3 Connecting to github.com (github.com)|140.82.121.3|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/311373685/74817332-1cf7-401d-870e-fcbfb6a685d0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220622%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220622T151022Z&X-Amz-Expires=300&X-Amz-Signature=9ce20fb04798d0cdd9d2069cf4c58cc9fab81191fcfc322e87730509144304a1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=311373685&response-content-disposition=attachment%3B%20filename%3Dtedge_mapper_0.7.2_armhf.deb&response-content-type=application%2Foctet-stream [following] --2022-06-22 16:10:22-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/311373685/74817332-1cf7-401d-870e-fcbfb6a685d0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220622%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220622T151022Z&X-Amz-Expires=300&X-Amz-Signature=9ce20fb04798d0cdd9d2069cf4c58cc9fab81191fcfc322e87730509144304a1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=311373685&response-content-disposition=attachment%3B%20filename%3Dtedge_mapper_0.7.2_armhf.deb&response-content-type=application%2Foctet-stream Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.110.133, ... Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1307928 (1.2M) [application/octet-stream] Saving to: '/tmp/tedge/tedge_mapper_0.7.2_armhf.deb'
tedge_mapper_0.7.2_armhf.deb 100%[=================================================================================================>] 1.25M 187KB/s in 6.8s
2022-06-22 16:10:30 (187 KB/s) - '/tmp/tedge/tedge_mapper_0.7.2_armhf.deb' saved [1307928/1307928]
Selecting previously unselected package tedge. (Reading database ... 42443 files and directories currently installed.) Preparing to unpack .../tedge/tedge_0.7.2_armhf.deb ... Unpacking tedge (0.7.2) ... Setting up tedge (0.7.2) ... Segmentation fault dpkg: error processing package tedge (--install): installed tedge package post-installation script subprocess returned error exit status 139 Errors were encountered while processing: tedge pi@raspberrypi:~ $
I downloaded and installed the packages manually from the build https://github.com/thin-edge/thin-edge.io/actions/runs/3278493185
It installed without any issue.
The issue here is that the release packages does not contain the package that is compatible for pi-zero, still the installation script goes ahead and installs the packages that are meant for armv7
with armhf
extension.
As a workaround if someone wants to install the thin-edge.io
on pi-zero
then they have to download the debian-packages-arm-unknown-linux-gnueabihf
package from the build
pipeline and have to manually install.
So, the proposal is to fix this issue with https://github.com/thin-edge/thin-edge.io/issues/1546
This is a very unfortunately problem introduced by Raspberry PIs as they classify the armv6l
CPU architecture under the Debian CPU architecture of armhf
, which is contrary to the Debian guidelines.
The official Debian guidelines under section 2.1.2. Three different ARM ports
states:
Debian/armhf works only on newer 32-bit ARM processors which implement at least the ARMv7 architecture with version 3 of the ARM vector floating point specification (VFPv3). It makes use of the extended features and performance enhancements available on these models.
So this actually means that both armv6l
and armv7
builds are both mapped to armhf
.deb
package.
Future research seems that the Raspbian OS deviated from Debian as indicated in this stackoverflow post
- Raspbian "armhf": ARMv6 + VFPv2
- Debian "armhf": ARMv7
And a direct quote from the Raspberry Pi documentation which explains the incompatibility with Debian armhf
The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2) and is thus incompatible with the Debian armhf port baseline of ARMv7+VFP3 and ARM hardware-floating-point ports for other distributions, which all have the same baseline. It is compatible with Debian armel (armv4t, soft(emulated) FP), but floating-point tasks will be slow when running the Debian armel port. (This doesn't stand for newer families)
This issue will be parked until we have a better way of publishing the armv6l package (due to the naming conflict).
Great news, we now publish all of the thin-edge components to a public APT repository (hosted graciously by cloudsmith.io for free).
For devices which use armv6l (e.g. Raspberry Pi Zeros), we have created an independent APT repository which avoids the naming conflict.
We have not publicly announced the new APT repositories yet, however they are already free to use :) You can check out the documentation to see how to use it. You can then install >= 0.9.0 versions using APT directly (not via the get-thin-edge_io.sh
script).
We will have more fanfare and the website docs ready closer to the next official release.