libcudart.so.7.0: cannot open shared object file

2,629 views
Skip to first unread message

Robert Platt

unread,
May 6, 2015, 4:27:06 PM5/6/15
to caffe...@googlegroups.com
I have a problem running matcaffe_demo.m:

"
>> matcaffe_demo
Invalid MEX-file '/home/rplatt/projects/tutorials/caffe/caffe/matlab/caffe/caffe.mexa64': libcudart.so.7.0: cannot open shared
object file: No such file or directory

Error in matcaffe_init (line 19)
if caffe('is_initialized') == 0

Error in matcaffe_demo (line 53)
  matcaffe_init();
"

But, libcudart.so.7.0 is in my LD_LIBRARY_PATH:

"
>> getenv('LD_LIBRARY_PATH')

/usr/local/MATLAB/R2014a/sys/os/glnxa64:/usr/local/MATLAB/R2014a/bin/glnxa64:/usr/local/MATLAB/R2014a/extern/lib/glnxa64:/usr/local/MATLAB/R2014a/runtime/glnxa64:/usr/local/MATLAB/R2014a/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/usr/local/MATLAB/R2014a/sys/java/jre/glnxa64/jre/lib/amd64/server:/usr/local/cuda-7.0/lib64
"

The directory, /usr/local/cuda-7.0/lib64, contains libcudart.so.7.0

I do not get this error if I compile to "CPU only" -- only when I compile for the gpu.

Any ideas?

Joseph Shtok

unread,
Jun 26, 2015, 3:29:15 AM6/26/15
to caffe...@googlegroups.com
Hi,

I have tried to run the Caffe on Eclipse, and got the same issue. Also had the The advice from this link helped me to move on to the next bug :)

Specifically, I executed in terminal the command 
sudo ldconfig /usr/local/cuda-7.0/lib64         (mind the change in cuda folder name).

Regards,
Joseph

介暐羅

unread,
Jun 7, 2016, 2:03:14 AM6/7/16
to Caffe Users

You solve my problem!!
I love u <3 <3 <3 
Reply all
Reply to author
Forward
0 new messages