Jetson orin AGX pytorch error "OSError: cannot open shared object file: No such file or directory"

Hi, I am setting environment on new Jetson agx orin.

My CUDA version is 11.4, cuDNN is 8.1.1.

I installed pytorch by following “pytorch for jetson

My pytorch version is 1.12.0a0+2c916ef.nv22.3.

However, if I import torch on python, I got error bellow

Python 3.8.10 (default, Nov 14 2022, 12:59:47) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rise/.local/lib/python3.8/site-packages/torch/", line 198, in <module>
  File "/home/rise/.local/lib/python3.8/site-packages/torch/", line 151, in _load_global_deps
    ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/usr/lib/python3.8/ctypes/", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: cannot open shared object file: No such file or directory

I also set PATH and LD_LIBRARY_PATH like bellow.

export PATH=$PATH:/usr/local/cuda-11.4/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.4/lib64:/usr/local/lib

I did everything I found on google to solve this error, but still I’m stuck on this issue.

How can I solve it?


Please help to double-check the cuDNN version in your environment with the following command.

$ cat /usr/include/aarch64-linux-gnu/cudnn_version_v8.h


I got error like bellow.

cat: /usr/include/aarch64-linux-gnu/cudnn_version_v8.h: No such file or directory

Is cuDNN is not installed properly?

I installed with bellow commands.

tar –xzvf cudnn-11.2-linux-x64-v8.1.1.33.tgz
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

I can check my version by bellow command

command 1

cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2


#define CUDNN_MAJOR 8
#define CUDNN_MINOR 1

#endif /* CUDNN_VERSION_H */


ldconfig -N -v $(sed 's/:/ /' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep libcudnn

result -> -> -> -> -> -> ->


The steps look incorrect.

You will need a Jetson package for Orin but the package you used is for the x86 environment.
Could you reflash the system and install the components from JetPack and try it again.


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