Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lazyboytql opened this issue Feb 29, 2024 · 4 comments

Comments

@lazyboytql
Copy link

Currently, when I run the picamera program in the virtual environment (env), this error is displayed:
Traceback (most recent call last):
File "/home/linh/docker-python/camera.py", line 1, in
import picamera
File "/home/linh/myenv/lib/python3.11/site-packages/picamera/init.py", line 72, in
from picamera.exc import (
File "/home/linh/myenv/lib/python3.11/site-packages/picamera/exc.py", line 41, in
import picamera.mmal as mmal
File "/home/linh/myenv/lib/python3.11/site-packages/picamera/mmal.py", line 47, in
from .bcm_host import VCOS_UNSIGNED
File "/home/linh/myenv/lib/python3.11/site-packages/picamera/bcm_host.py", line 47, in
_lib = ct.CDLL('libbcm_host.so')
File "/usr/lib/python3.11/ctypes/init.py", line 376, in init
self._handle = _dlopen(self._name, mode)
OSError: libbcm_host.so: cannot open shared object file: No such file or directory

In this virtual environment I have installed all the necessary libraries to run the program.
I am using raspberry pi 4 Model B+ and Picamera V3
Please help me fix this error and get your response as soon as possible, thank you very much !!
Error

@guoxiaolong5669
Copy link

I have the same problem and do not know how to solve it

@Vaylordqt
Copy link

did you resolve this issue ?

@imbrianj
Copy link

Are you running a 32 bit or 64 bit OS?

@6by9
Copy link
Collaborator

6by9 commented Apr 15, 2024

Looking at the OP

I am using raspberry pi 4 Model B+ and Picamera V3

The v3 camera is ONLY supported by libcamera, not the legacy firmware camera stack. picamera is therefore incompatible with it as it is using the legacy stack. You need to use libcamera / rpicam-apps / picamera2.

If using a V1, V2, or HQ camera, then picamera can only work on the 32 bit OS, even if the SoC is capable of running a 64bit one.

The legacy stack is deprecated, and you are strongly advised to migrate to a libcamera based solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants