1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OSError: libnvToolsExt.so.1: cannot open shared object file: No such file or directory

Posted at

事象

import pytorchすると、OSError: libnvToolsExt.so.1: cannot open shared object file: No such file or directoryエラーが発生する。

下記は、JetPack 6.1にPyTorch 2.3(torch-2.3.0-cp310-cp310-linux_aarch64.whl)をインストールした後、import pytorchしたとき。

$ python
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "/home/jetson/.local/lib/python3.10/site-packages/torch/__init__.py", line 176, in _load_global_deps
    ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libnvToolsExt.so.1: cannot open shared object file: No such file or directory

原因

libnvToolsExt.so.1がインストールされていない。

解決方法

CUDA Toolkitをインストールする。

sudo apt update && sudo apt install cuda-toolkit-12-6 cuda-compat-12-6

未検証だが、cuda-libraries-dev-12-6だけでも良いのかも?

インストールすると、/usr/local/cuda-x.y/lib64/にlibnvToolsExt.so.1が配置される。

$ ls -l /usr/local/cuda-12.6/lib64/libnvToolsExt.so.1
lrwxrwxrwx 1 root root 22  8月 15 03:00 /usr/local/cuda-12.6/lib64/libnvToolsExt.so.1 -> libnvToolsExt.so.1.0.0
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?