【问题标题】:Faster RCNN:libcudart.so.7.0: cannot open shared object file: No such file or directoryFaster RCNN:libcudart.so.7.0:无法打开共享对象文件:没有这样的文件或目录
【发布时间】:2025-12-16 15:05:02
【问题描述】:

当我从https://github.com/rbgirshick/py-faster-rcnn/tree/master 运行演示以及演示成功完成之前的所有其他步骤时,我收到以下错误:

mona@pascal:~/computer_vision/py-faster-rcnn$ ./tools/demo.py
Traceback (most recent call last):
  File "./tools/demo.py", line 18, in <module>
   m from fast_rcnn.test import im_detect
  File "/home/mona/computer_vision/py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 17, in <module>
    from fast_rcnn.nms_wrapper import nms
  File "/home/mona/computer_vision/py-faster-rcnn/tools/../lib/fast_rcnn/nms_wrapper.py", line 9, in <module>
    from nms.gpu_nms import gpu_nms
ImportError: libcudart.so.7.0: cannot open shared object file: No such file or directory

我有以下系统设置:

CuDNN V4
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
$ uname -a
Linux pascal 3.13.0-62-generic #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ lspci | grep -i nvidia
03:00.0 3D controller: NVIDIA Corporation GK110BGL [Tesla K40c] (rev a1)
83:00.0 3D controller: NVIDIA Corporation GK110BGL [Tesla K40c] (rev a1)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

问题是什么,如何解决?

【问题讨论】:

  • 您已安装 CUDA 7.5,并且您尝试运行的软件与 CUDA 7.0 相关联。您可以在您的机器上安装 CUDA 7.0 并通过环境变量指示您的软件使用它,或者您可以重建您尝试针对 CUDA 7.5 运行的软件
  • 我也是用CUDA7.5构建的软件

标签: python cuda shared-libraries caffe cudnn


【解决方案1】:

虽然不是一个简洁的解决方案,但我最终更改了使用 CUDA 7.0 的路径。无论出于何种原因,Faster RCNN 目前似乎与 Ubuntu 14.04 上的 CUDA 7.5 不兼容。在 Ubuntu 15.10 上,我让它与具有相同设置的 CUDA7.5 一起工作!!!!

【讨论】:

    【解决方案2】:

    试试这个:为我工作。

    export LD_LIBRARY_PATH=/usr/local/cuda/lib64/
    

    【讨论】:

      【解决方案3】:

      解决方案可能是将 CUDA_PATH 更改为 make.sh 文件中的真正 cuda 路径。

      【讨论】: