Does picamera work on Ubuntu 20.04 arm64?

I am on pi4 4gb.

  1. Added start_x=1 to /boot/firmware/usercfg.txt and rebooted. Checked for updates.
  2. pip3 install picamera - ok.

When import picamera is called, I get:

OSError: libbcm_host.so: cannot open shared object file: No such file or directory

I searched for libbcm_host.so and could not find anything. sudo ldconfig -v | grep libbcm did not return any results. I also searched /usr/lib/ and /usr/local/lib/.

Thank you!

  • You'll need these alien packages libraspberrypi0 libraspberrypi-dev libraspberrypi-doc libraspberrypi-bin. – Dougie Jul 6 '20 at 10:36
  • These alien packages are not found when running sudo apt install. I think the issue is that I have a 64 bit version of ubuntu, I'll try to build the library from source – lead-free Jul 6 '20 at 13:47
  • You'll need to lift those from the RaspiOS repo. – Dougie Jul 6 '20 at 14:44
  • It turns out that the required libraries fail to build on 64bit yet, the good news is that the pi community is actively working on the issue. – lead-free Jul 6 '20 at 17:43
  • Try it on the ubuntu 32-bit. I summarized all the step here: zengliyang.wordpress.com/2021/01/04/… – ChaseDreamInfinity Jan 7 at 4:25

The longer answer is that rpi does not support it in their packages. The camera is functional under aarch64.

Don't install the rpi packages picamera on Ubuntu 20.04 64 bit, instead use opencv, for example, to access and process images or video. OpenCV example for taking a single image:

import cv2

# open camera
cap = cv2.VideoCapture('/dev/video0', cv2.CAP_V4L)

# set dimensions
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 2560)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1440)

# take frame
ret, frame = cap.read()
# write frame to file
cv2.imwrite('image.jpg', frame)
# release camera

This is tested under Ubuntu 20.04.2 LTS 64bit using the RPI HQ Camera v1.0 2018 and functions as expected.

  • This works well for me, tried Ubuntu (Desktop) 21.04 with camera enabled. – Raffi 2 days ago

The short answer is "no." Raspberry Pi userland doesn't support 64 bit yet. This seems to be the root cause: https://github.com/raspberrypi/userland/issues/630#issuecomment-654369049

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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