OSError about libcurand.so.10 while importing torch to Xavier

When I installed torch according to the instructions, I encountered some problems. The following is the relevant version information of Xavier I currently use:

nvidia@Xavier:~$ cat /etc/nv_tegra_release

# R32 (release), REVISION: 5.1, GCID: 27362550, BOARD: t186ref, EABI: aarch64, DATE: Wed May 19 18:16:00 UTC 2021
nvidia@Xavier:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_21:14:42_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

The version of torch I installed is pytorch v1.7.0.
When I check the torch installation, python reports the following error:

>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nvidia/.local/lib/python3.6/site-packages/torch/__init__.py", line 189, in <module>
  File "/home/nvidia/.local/lib/python3.6/site-packages/torch/__init__.py", line 142, in _load_global_deps
    ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libcurand.so.10: cannot open shared object file: No such file or directory

Libcurand.so.10 does not seem to be installed in my Xavier. I found that the previous discussion on the forum did not involve jetpack4.5.1, so I would like to know whether I also encountered the problem of version adaptation. Looking forward to an answer.


Which PyTorch package do you install?
Could you try the package shared in the below topic?


I have downloaded the pytorch package on the above link page, including v1.9.0, v1.8.0 and v1.7.0, but always reported the previous error:

OSError: libcurand.so.10: cannot open shared object file: No such file or directory


There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

Hi @vesvenh, you should still have a libcurand.so.10 symbolic link on your system:

ls -ll /usr/local/cuda-10.2/targets/aarch64-linux/lib/libcurand*

lrwxrwxrwx 1 root root       15 Oct 29  2019 /usr/local/cuda-10.2/targets/aarch64-linux/lib/libcurand.so -> libcurand.so.10
lrwxrwxrwx 1 root root       22 Oct 29  2019 /usr/local/cuda-10.2/targets/aarch64-linux/lib/libcurand.so.10 -> libcurand.so.
-rw-r--r-- 1 root root 62596184 Oct 29  2019 /usr/local/cuda-10.2/targets/aarch64-linux/lib/libcurand.so.
-rw-r--r-- 1 root root 62751508 Oct 29  2019 /usr/local/cuda-10.2/targets/aarch64-linux/lib/libcurand_static.a

Can you confirm that you have a similar setup?

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