Jetson Xavier AGX: ImportError: libnvsocsys.so: cannot open shared object file: No such file or directory

Hello, I am currently working on a jetson Xavier AGX with: jetpack 5.1.3, l4t 35.5.0, DS 6.3. While running a docker image with l4t 35.4.1 and DS 6.3 I am getting this error: ImportError: libnvsocsys.so: cannot open shared object file: No such file or directory when importing the nvidia library VPI. At first I thought something was wrong with the docker image, but other tests ensured me it was not. It looks like that if the docker image has a different version in L4T it has some problems. So I was asking if my guess is correct (machine with l4t x.x.x version and docker image with l4t y.y.y version don’t go along) and if there is any fix to it. I checked on dockerhub, but there are no docker images with nvidia libs installed and a l4t 35.5.0. As image right now I am using dustynv/l4t-ml:r35.4.1.
Thank you for any help you can give me!

Hi

Do you run the container with --runtime nvidia?
We can find the file in the below location and it should be mounted through the nvidia runtime.

/usr/lib/aarch64-linux-gnu/tegra/libnvsocsys.so

$ cat /etc/nvidia-container-runtime/host-files-for-container.d/l4t.csv | grep libnvsocsys.so
lib, /usr/lib/aarch64-linux-gnu/tegra/libnvsocsys.so

Thanks.

Inside the docker container I get this:
root@b1e96aeebe08:/app# cat /etc/nvidia-container-runtime/host-files-for-container.d/l4t.csv | grep libnvsocsys.so
cat: /etc/nvidia-container-runtime/host-files-for-container.d/l4t.csv: No such file or directory

I do not run the container with --runtime nvidia, but before the l4t upgrade on my xavier agx(from 35.4.1 to 35.5.0) the docker was running fine, while after the upgrade it gives the error mentioned in the message highlighted. Although I did try to run the container adding the --runtime nvidia but still getting the error.

Hi

The l4t.csv file is outside of the container.
As nvidia runtime will mount some Jetson-specific library automatically to allow the container to access.

Could you check if the l4t.csv exists in your environment and contains the libnvsocsys.so file?
If yes, please also check if you can access the libnvsocsys.so file inside the container.

Thanks.

I confirm everything you said! I have the libnvsocsys.so inside the l4t.csv and i can find the libnvsocsys.so in the path /usr/lib/aarch64-linux-gnu/tegra inside the container. So why am I getting the error?

Hi,

Could you try to update $LD_LIBRARY_PATH (inside the container) to see if it helps?

$ export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/tegra/:$LD_LIBRARY_PATH

Thanks.

I have tried and the error changed:

/usr/local/lib/python3.8/dist-packages/cv2/init.py:86: in bootstrap
import cv2
E ImportError: /usr/lib/aarch64-linux-gnu/tegra/libdrm.so.2: file too short

Hi,

The library is also mounted outside of the container.
Could you double-check if you can access it inside the container?

$ ll /usr/lib/aarch64-linux-gnu/tegra/libdrm.so.2
-rw-r--r-- 1 root root 146200 Aug 28 09:03 /usr/lib/aarch64-linux-gnu/tegra/libdrm.so.2

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.