Closed kbingham closed 2 years ago
I was getting the following error when running cam --list
:
cam: error while loading shared libraries: libcamera-base.so.0: cannot open shared object file: No such file or directory
I then ran ldconfig
which gave me an error:
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
So I ran sudo ldconfig
then re-compiled and installed libcamera and this time cam --list
ran as expected.
You don't need to recompile after running sudo ldconfig.
The issue is that on first install the libraries get put in to your system and the linker needs to be update. When you install a package using something like apt or such the package manager does this for you, but meson doesn't.
Unless perhaps we can add a post install hook maybe...
This should all be resolved by:
Just to say, I stumbled across this issue today on my desktop computer, but also on github CI: https://github.com/lit-robotics/libcamera-rs/pull/12
So https://github.com/mesonbuild/meson/issues/9721 brought this back in. The answer is simply to manually run sudo ldconfig when required as I understand it.
It would seem that installing libcamera from clean requires a manual invocation of ldconfig to update the ld paths. I'd expect this to be handled by the install phase, so perhaps something is missing.