Problem with ImportError: libnvdla_compiler.so: cannot open shared object file: No such file or directory

Hello
I use Nvidia AGX Jetson Orin Developer Kit Jetpack 6.0.0:

cat /etc/nv_tegra_release
# R36 (release), REVISION: 3.0, GCID: 36191598, BOARD: generic, EABI: aarch64, DATE: Mon May  6 17:34:21 UTC 2024
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

When i try import tensorrt in isaac_ros_common container, the following error apears:

Running isaac_ros_dev-aarch64-container
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

admin@AGV:/workspaces/isaac_ros-dev$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorrt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorrt'
>>>

I tried install python3-libnvinfer-dev:

root@AGV:/workspaces/isaac_ros-dev# sudo apt-get install python3-libnvinfer-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  python3-libnvinfer python3-libnvinfer-dispatch python3-libnvinfer-lean
The following NEW packages will be installed:
  python3-libnvinfer python3-libnvinfer-dev python3-libnvinfer-dispatch python3-libnvinfer-lean
0 upgraded, 4 newly installed, 0 to remove and 104 not upgraded.
Need to get 1,137 kB of archives.
After this operation, 6,811 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://repo.download.nvidia.com/jetson/common r36.3/main arm64 python3-libnvinfer arm64 8.6.2.3-1+cuda12.2 [576 kB]
Get:2 https://repo.download.nvidia.com/jetson/common r36.3/main arm64 python3-libnvinfer-lean arm64 8.6.2.3-1+cuda12.2 [279 kB]
Get:3 https://repo.download.nvidia.com/jetson/common r36.3/main arm64 python3-libnvinfer-dispatch arm64 8.6.2.3-1+cuda12.2 [279 kB]
Get:4 https://repo.download.nvidia.com/jetson/common r36.3/main arm64 python3-libnvinfer-dev arm64 8.6.2.3-1+cuda12.2 [2,962 B]
Fetched 1,137 kB in 2s (487 kB/s)                  
Selecting previously unselected package python3-libnvinfer.
(Reading database ... 164161 files and directories currently installed.)
Preparing to unpack .../python3-libnvinfer_8.6.2.3-1+cuda12.2_arm64.deb ...
Unpacking python3-libnvinfer (8.6.2.3-1+cuda12.2) ...
Selecting previously unselected package python3-libnvinfer-lean.
Preparing to unpack .../python3-libnvinfer-lean_8.6.2.3-1+cuda12.2_arm64.deb ...
Unpacking python3-libnvinfer-lean (8.6.2.3-1+cuda12.2) ...
Selecting previously unselected package python3-libnvinfer-dispatch.
Preparing to unpack .../python3-libnvinfer-dispatch_8.6.2.3-1+cuda12.2_arm64.deb ...
Unpacking python3-libnvinfer-dispatch (8.6.2.3-1+cuda12.2) ...
Selecting previously unselected package python3-libnvinfer-dev.
Preparing to unpack .../python3-libnvinfer-dev_8.6.2.3-1+cuda12.2_arm64.deb ...
Unpacking python3-libnvinfer-dev (8.6.2.3-1+cuda12.2) ...
Setting up python3-libnvinfer (8.6.2.3-1+cuda12.2) ...
Setting up python3-libnvinfer-lean (8.6.2.3-1+cuda12.2) ...
Setting up python3-libnvinfer-dispatch (8.6.2.3-1+cuda12.2) ...
Setting up python3-libnvinfer-dev (8.6.2.3-1+cuda12.2) ...
root@AGV:/workspaces/isaac_ros-dev# 

After that i see something like this:

admin@AGV:/workspaces/isaac_ros-dev$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorrt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorrt'
>>> 
KeyboardInterrupt
>>> 
admin@AGV:/workspaces/isaac_ros-dev$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorrt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.10/dist-packages/tensorrt/__init__.py", line 67, in <module>
    from .tensorrt import *
ImportError: libnvdla_compiler.so: cannot open shared object file: No such file or directory
>>> 

I run container with --runtime nvidia argument.

After dpkg -l | grep vinfer in container:

agv@AGV:~/workspaces/isaac_ros-dev/src/isaac_ros_common$ docker exec -it --user root  isaac_ros_dev-aarch64-container bash
root@AGV:/workspaces/isaac_ros-dev# dpkg -l | grep vinfer
ii  libnvinfer-bin                                    8.6.2.3-1+cuda12.2                          arm64        TensorRT binaries
ii  libnvinfer-dev                                    8.6.2.3-1+cuda12.2                          arm64        TensorRT development libraries
ii  libnvinfer-dispatch-dev                           8.6.2.3-1+cuda12.2                          arm64        TensorRT development dispatch runtime libraries
ii  libnvinfer-dispatch8                              8.6.2.3-1+cuda12.2                          arm64        TensorRT dispatch runtime library
ii  libnvinfer-headers-dev                            8.6.2.3-1+cuda12.2                          arm64        TensorRT development headers
ii  libnvinfer-headers-plugin-dev                     8.6.2.3-1+cuda12.2                          arm64        TensorRT plugin headers
ii  libnvinfer-lean-dev                               8.6.2.3-1+cuda12.2                          arm64        TensorRT lean runtime libraries
ii  libnvinfer-lean8                                  8.6.2.3-1+cuda12.2                          arm64        TensorRT lean runtime library
ii  libnvinfer-plugin-dev                             8.6.2.3-1+cuda12.2                          arm64        TensorRT plugin libraries
ii  libnvinfer-plugin8                                8.6.2.3-1+cuda12.2                          arm64        TensorRT plugin libraries
ii  libnvinfer-samples                                8.6.2.3-1+cuda12.2                          all          TensorRT samples
ii  libnvinfer-vc-plugin-dev                          8.6.2.3-1+cuda12.2                          arm64        TensorRT vc-plugin library
ii  libnvinfer-vc-plugin8                             8.6.2.3-1+cuda12.2                          arm64        TensorRT vc-plugin library
ii  libnvinfer8                                       8.6.2.3-1+cuda12.2                          arm64        TensorRT runtime libraries

After ls -ll /usr/lib/aarch64-linux-gnu/tegra/libnvdla* on host computer:

agv@AGV:~$ ls -ll /usr/lib/aarch64-linux-gnu/tegra/libnvdla*
-rw-r--r-- 1 root root 6499168 maj  6 19:26 /usr/lib/aarch64-linux-gnu/tegra/libnvdla_runtime.so

What’s more: after apt search nvidia-container* on host i see:

agv@AGV:~$ apt search nvidia-container*
Sorting... Done
Full Text Search... Done
libnvidia-container-dev/unknown 1.16.0-1 arm64
  NVIDIA container runtime library (development files)

libnvidia-container-tools/stable 1.14.2-1 arm64
  NVIDIA container runtime library (command-line tools)

libnvidia-container1/stable 1.14.2-1 arm64
  NVIDIA container runtime library

libnvidia-container1-dbg/unknown 1.16.0-1 arm64
  NVIDIA container runtime library (debugging symbols)

nvidia-container/stable 6.0+b106 arm64
  NVIDIA Container Meta Package

nvidia-container-runtime/unknown 3.14.0-1 all
  NVIDIA Container Toolkit meta-package

nvidia-container-toolkit/stable 1.14.2-1 arm64
  NVIDIA Container toolkit

nvidia-container-toolkit-base/stable 1.14.2-1 arm64
  NVIDIA Container Toolkit Base

nvidia-docker2/unknown 2.14.0-1 all
  NVIDIA Container Toolkit meta-package
agv@AGV:~$ docker exec -it --user root  isaac_ros_dev-aarch64-container bash
root@AGV:/workspaces/isaac_ros-dev# find / -name "*nvdla_*.so"
/usr/lib/aarch64-linux-gnu/tegra/libnvdla_runtime.so
/usr/lib/aarch64-linux-gnu/nvidia/libnvdla_runtime.so
root@AGV:/workspaces/isaac_ros-dev# 

What should i do next? - I would like to avoid reinstalling whole system/
I would be grateful for any help.

Hi,

You can find libnvdla_compiler.so in the below link.
Please try to install it within the container to see if it can work.

https://repo.download.nvidia.com/jetson/

Thanks.

Hi,
Unfortunately I couldn’t find and package with “libnvda” in the name.


Which package i should install?
Thanks for reply.

Hi,

Please try nvidia-l4t-dla-compiler_36.3.1-20240516220919_arm64.deb.
Thanks.

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