@sophiahaoui did you then update your original Dockerfile
to point to your new image? It sounds like it’s still pulling the old image if it’s saying it’s linux/amd64
, as I agree, your new one looks correct and is showing linux/arm64
. Alternatively share your Dockerfile as my esteemed colleague suggested above
Hi,
Here are the logs from the attempted build
| Packaging the project source...[Warn]
[Warn] -----------------------------------------------------------------------------------------
[Warn] The following .dockerignore file(s) will not be used:
[Warn] * /Users/sophiahaoui/NewSunRoad/Solsense/balena/solmon/node_modules/sqlite3/.dockerignore
[Warn] When --multi-dockerignore (-m) is used, only .dockerignore files at the
[Warn] root of each service's build context (in a microservices/multicontainer
[Warn] fleet), plus a .dockerignore file at the overall project root, are used.
[Warn] See "balena help push" for more details.
[Warn] -----------------------------------------------------------------------------------------
[Info] Starting build for customers_gen25, user shaoui
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/1811933/devices
[Info] Building on arm01
[Info] Pulling previous images for caching purposes...
[Success] Successfully pulled cache images
[solmon] Step 1/30 : FROM sophiahaoui/raspberrypi4-64-ubuntu-python:3-bionic-build-20200915 as build
[solmon] ---> 17ea33c69306
[solmon] Step 2/30 : WORKDIR /usr/src/app
[solmon] Using cache
[solmon] ---> 9fbae44e7414
[solmon] Step 3/30 : COPY /lib/requirements3.txt /lib/requirements3.txt
[solmon] failed to get destination image "sha256:9fbae44e7414963313d4a0f2ba517eecfe9b39289e5526afebf6d50e79d43b62": image with reference sha256:9fbae44e7414963313d4a0f2ba517eecfe9b39289e5526afebf6d50e79d43b62 was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: solmon
[Error] Error: failed to get destination image "sha256:9fbae44e7414963313d4a0f2ba517eecfe9b39289e5526afebf6d50e79d43b62": image with reference sha256:9fbae44e7414963313d4a0f2ba517eecfe9b39289e5526afebf6d50e79d43b62 was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64
[Info] Built on arm01
[Error] Not deploying release.
Remote build failed
And here are the Dockerfile lines for those first steps that get through:
FROM sophiahaoui/raspberrypi4-64-ubuntu-python:3-bionic-build-20200915 as build
WORKDIR /usr/src/app
COPY /lib/requirements3.txt /lib/requirements3.txt
RUN pip3 install -r /lib/requirements3.txt
Let me know what else would be helpful!
Thanks,
Sophia
@klutchell I did end up creating a new fleet using RPI 3, 32 bit OS. Just to recap, the actual device is a RPI 4 (64 bit).
I was able to push a 32 bit app, but was running into application errors because the container appears to be running as a 64 bit app.
When I started an SSH session in the service and ran uname -a
I got the following output:
Linux 57f8136 5.15.34-v8 #1 SMP PREEMPT Tue Apr 19 19:21:26 UTC 2022 aarch64 GNU/Linux
The name of the docker file: Dockerfile.armv7hf
The FROM line: FROM balenalib/raspberrypi3
Hopefully this helps!
Hey @jpayne0061, what were the application errors you were getting at runtime? It’s expected that uname would show the actual architecture of the device, but the armv7 image should have no issues running on aarch64.
Thank you @sophiahaoui, this is very helpful. I’ve been able to reproduce it locally and on our remote builders, and I’m investigating possible solutions. I hope to have more to share soon!
@klutchell I am trying to get a camera working, using the picamera package.
The error I get is this: OSError: libbcm_host.so: cannot open shared object file: No such file or directory
After a quick google search, it sounds like this error occurs when trying to use the picamera package on a 64 bit system.
Here’s another failing Dockerfile (stripped down from my original but still failing). I had previously been using golang:1.15, but getting this error made me upgrade. Unfortunately, there’s still an error.
FROM --platform=linux/arm64 balenalib/raspberrypi4-64-golang:1.19 as builder
RUN go install -v github.com/mozz100/tohora@v0.3.2
FROM bh.cr/balenalabs/browser-aarch64
RUN install_packages cec-utils
COPY --from=builder /go/bin/tohora /home/chromium/tohora
Here is how the logs end:
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: kiosk
[Error] Error: failed to get destination image “sha256:3d5a94136dbf7f4a051c26c37fc56d644152b80809daf306cae51c95be20c272”: image with reference sha256:3d5a94136dbf7f4a051c26c37fc56d644152b80809daf306cae51c95be20c272 was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64
[Info] Built on arm01
[Error] Not deploying release.
Remote build failed
Hey all, we just released a new version of the remote builders to production that should have addressed all of these issues.
Please let us know if you are still encountering errors like those mentioned above!
We are still having the same issue as @jpayne0061, when trying to use the picamera module.
The error I get is this: OSError: libbcm_host.so: cannot open shared object file: No such file or directory
We are using the image:
FROM balenalib/raspberrypi4-64-debian:latest
I’m facing a similar issue when trying to update balenaOS through the dashboard:
Tue Mar 18 14:43:47 UTC 2025
[upgrade-2.x.sh][000000000][INFO]Raw target version: 6.5.1+rev2
[upgrade-2.x.sh][000000001][INFO]Target version supports hostapps, no device type support check required.
[upgrade-2.x.sh][000000001][INFO]Target OS version "6.5.1+rev2" OK.
[upgrade-2.x.sh][000000001][INFO]Host OS version "6.3.18" OK.
[upgrade-2.x.sh][000000002][INFO]Attempting host OS update using deltas
[upgrade-2.x.sh][000000043][INFO]Found delta image: registry2.balena-cloud.com/v2/bfcd84d8628be1bede175ef39e88c5a6:delta-0938c9c3349c0ca2, size: 49 MB
[upgrade-2.x.sh][000000043][INFO]No resin-device-progress fix is required...
[upgrade-2.x.sh][000000043][INFO]No supervisor updater fix is required...
[upgrade-2.x.sh][000000043][INFO]hostapp-update command exists, use that for update
[upgrade-2.x.sh][000000050][INFO]Running pre-update fixes for raspberrypi4-64
[upgrade-2.x.sh][000000050][INFO]Removing start_db.elf from boot partition
[upgrade-2.x.sh][000000050][INFO]Removing fixup_db.dat from boot partition
...
...
[98-pieeprom][INFO] Updating SPI EEPROM firmware
/usr/libexec/pieeprom-update.sh: line 34: echo: write error: Invalid argument
flashrom v1.2 on Linux 6.1.77-v8 (aarch64)
flashrom is free software, get the source code at https://flashrom.org
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
linux_spi_init: failed to open /dev/spidev0.0: No such file or directory
Error: Programmer initialization failed.
[98-pieeprom][ERROR] Failed to update SPI EEPROM firmware
...
...
[99-resin-uboot][INFO] Switching uboot root partition index to 2...
[99-resin-uboot][INFO] Done.
[hostapp-update][INFO] New/Forward hooks (new os container) ran successfully.
[hostapp-update][INFO] After hooks (old os) ran successfully
[hostapp-update][INFO] Finished running hostapp update
[upgrade-2.x.sh][000011415][INFO]No device-specific pre-update fix for raspberrypi4-64
[upgrade-2.x.sh][000011415][INFO]Supervisor update start...
[upgrade-2.x.sh][000011415][INFO]No explicit supervisor version was provided, update to default version in target balenaOS...
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
[upgrade-2.x.sh][000011417][INFO]Extracted default version is v16.12.7...
[upgrade-2.x.sh][000011418][INFO]Supervisor state: Target 16.12.7, current 16.12.0, scheduled 16.12.8
[upgrade-2.x.sh][000011418][INFO]Updating supervisor target state from v16.12.0 to v16.12.8
Running as unit: run-update-supervisor.service
[update-balena-supervisor][INFO] Getting image name and version...
[update-balena-supervisor][INFO] Getting image id...
Error: No such object: registry2.balena-cloud.com/v2/2148f05dd4c9431dd022cca1dd26089b
[update-balena-supervisor][INFO] Pulling supervisor registry2.balena-cloud.com/v2/2148f05dd4c9431dd022cca1dd26089b at version latest...
Error response from daemon: Get "https://registry2.balena-cloud.com/v2/": net/http: TLS handshake timeout
[update-balena-supervisor][ERROR] Using default tag: latest
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 21.027s
let me know if this is not the appropriate topic.