unable to install: .build_release/tools/caffe dyld: Library not loaded: @rpath/libcudart.7.5.dylib

972 views
Skip to first unread message

Da Cao

unread,
Oct 7, 2015, 9:50:03 PM10/7/15
to Caffe Users
dacao@Das-MacBook-Air:~/caffe$ sudo make runtest
.build_release/tools/caffe
dyld: Library not loaded: @rpath/libcudart.7.5.dylib
  Referenced from: /Users/dacao/caffe/.build_release/tools/caffe
  Reason: image not found
make: *** [runtest] Trace/BPT trap: 5

this error above pops up in "sudo make runtest". I did some research online and it seems to be a very common error when people try to install. 
However, I have tried all the solutions that I could find, and no matter how I set up the environment, this error keeps popping up

1. I have got all the dependancies installed.
2. "sudo make all" and "sudo make test" finished with no error (however there are a few warnings, which I think everyone would have)
3. immediately after "sudo make all" and "sudo make test", after I type "sudo make runtest", this error pops out!

Can anyone please help? 

here is my ENV:

dacao@Das-MacBook-Air:~/caffe$ env
TERM_PROGRAM=Apple_Terminal
DYLD_FALLBACK_LIBRARY_PATH=/usr/local/cuda/lib:/Users/dacao/anaconda/lib:/usr/local/lib:/usr/lib:/Developer/NVIDIA/CUDA-7.5/lib
SHELL=/bin/bash
TMPDIR=/var/folders/ds/n0kkjc_9313d_cjnlp4kqg8c0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.Dr2TBO3WBs/Render
TERM_PROGRAM_VERSION=343.7
OLDPWD=/Users/dacao
TERM_SESSION_ID=ECFF5816-96C9-4384-A617-BE99B5E8202E
USER=dacao
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Llr8xjrdew/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
LSCOLORS=exfxcxdxbxegedabagacad
PATH=/Developer/NVIDIA/CUDA-7.5/bin:/Users/dacao/anaconda/bin:/anaconda/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin
PWD=/Users/dacao/caffe
LANG=en_US.UTF-8
XPC_FLAGS=0x0
PS1=\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ 
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/dacao
DYLD_LIBRARY_PATH=/usr/local/cuda/lib:/Developer/NVIDIA/CUDA-7.5/lib:/Developer/NVIDIA/CUDA-7.5/lib
LOGNAME=dacao
DISPLAY=/private/tmp/com.apple.launchd.Kub5uO5a7s/org.macosforge.xquartz:0
_=/usr/bin/env









Note that PATH, DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH are all set up:



 

DYLD_LIBRARY_PATH=/usr/local/cuda/lib:/Developer/NVIDIA/CUDA-7.5/lib:/Developer/NVIDIA/CUDA-7.5/lib

DYLD_FALLBACK_LIBRARY_PATH=/usr/local/cuda/lib:/Users/dacao/anaconda/lib:/usr/local/lib:/usr/lib:/Developer/NVIDIA/CUDA-7.5/lib


PATH=/Developer/NVIDIA/CUDA-7.5/bin:/Users/dacao/anaconda/bin:/anaconda/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin

Da Cao

unread,
Oct 8, 2015, 6:29:37 PM10/8/15
to Caffe Users
Can anybody please help? 

Kirill Malev

unread,
Oct 10, 2015, 4:02:14 AM10/10/15
to Caffe Users
I have same error, so try to be patient.
If you need caffe instantly, try downgrading to CUDA 7.0 / CUDA 6.5

пятница, 9 октября 2015 г., 1:29:37 UTC+3 пользователь Da Cao написал:
Can anybody please help? 

leo.li...@gmail.com

unread,
Oct 11, 2015, 9:24:42 AM10/11/15
to Caffe Users
Exactly the same error. I have struggled for it for a very long time :(

在 2015年10月8日星期四 UTC+8上午9:50:03,Da Cao写道:

Da Cao

unread,
Oct 11, 2015, 8:52:42 PM10/11/15
to Caffe Users
CUDA 7.0 does not support OS X 10.10, does it? 
Which version are you using? 

Da Cao

unread,
Oct 11, 2015, 8:53:27 PM10/11/15
to Caffe Users
I'm wondering how many people have had the same issue and how they got through it. :) 

Guillaume Sabran

unread,
Oct 13, 2015, 1:02:13 AM10/13/15
to Caffe Users
Same issue here. Have no idea of what's happening...

esen...@leaflabs.com

unread,
Oct 13, 2015, 2:48:51 PM10/13/15
to Caffe Users
This doesn't seem to be an OS-specific problem, since I obtain nearly the same error when just trying to run make runtest on Linux Mint:

esennesh@esennesh-XPS-8700 ~/caffe $ make runtest -j4
.build_release/tools/caffe
.build_release/tools/caffe: error while loading shared libraries: libcudart.so.7.5: cannot open shared object file: No such file or directory
make: *** [runtest] Error 127

esen...@leaflabs.com

unread,
Oct 13, 2015, 2:51:49 PM10/13/15
to Caffe Users
Ah.  It seems that if you're running on a 64-bit machine, NVIDIA's installers will put CUDA in a cuda-7.5/lib64 directory, where Caffe won't find it.  The following command got it working for me.

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

Guillaume Sabran

unread,
Oct 13, 2015, 3:44:22 PM10/13/15
to Caffe Users
Hum here I have no lib64, and libcudart.7.5.dylib is in /usr/local/cuda/lib/ btw what the difference between using LD_LIBRARY_PATH, DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH ? this post suggests to use DYLD_FALLBACK_LIBRARY_PATH http://stackoverflow.com/questions/3146274/is-it-ok-to-use-dyld-library-path-on-mac-os-x-and-whats-the-dynamic-library-s ?

Eli Sennesh

unread,
Oct 13, 2015, 4:07:41 PM10/13/15
to caffe...@googlegroups.com
DYLD_LIBRARY_PATH is for Mac OS X.  LD_LIBRARY_PATH is for Linux.
--
You received this message because you are subscribed to a topic in the Google Groups "Caffe Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/caffe-users/ecOSgCAbK_Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/bfa3d8bb-3743-4a88-88bb-b015ac1b5027%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Narendra Devta-Prasanna

unread,
Oct 18, 2015, 6:11:24 PM10/18/15
to Caffe Users

I am getting the same error message when I do make runtest. There were no errors when doing make all and make test except some warnings. The LD_LIBRARY_PATH is not set as mentioned by others.

I am not sure what to try next...

Eli Sennesh

unread,
Oct 19, 2015, 10:40:15 AM10/19/15
to caffe...@googlegroups.com
If you're on Mac OS X, you need to set DYLD_LIBRARY_PATH.  If you're on Linux, LD_LIBRARY_PATH.  If you're on Windows, upgrade to a better operating system.
--
You received this message because you are subscribed to a topic in the Google Groups "Caffe Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/caffe-users/ecOSgCAbK_Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.

Da Cao

unread,
Oct 19, 2015, 10:54:25 AM10/19/15
to Caffe Users
I am on Mac OS X, and DYLD_LIBRARY_PATH has been set properly. 
The same error shows up in runtest :  Library not loaded: @rpath/libcudart.7.5.dylib

I have even tried to install a lower version using CUDA 7.0, and the same error shows:

 Library not loaded: @rpath/libcudart.7.0.dylib

Narendra Devta-Prasanna

unread,
Oct 20, 2015, 2:26:36 PM10/20/15
to Caffe Users

Hi,

I had same error on Mac OS X 10.11 (El Capitan) but after following instructions to disable SIP which is a new feature in this release of OS X, I was able to successfully do make runtest. You can refer to this thread: https://groups.google.com/forum/#!topic/caffe-users/88i8X4bxivw

Hope this helps in your case too.

leo.li...@gmail.com

unread,
Oct 21, 2015, 10:29:56 AM10/21/15
to Caffe Users
This worked for me. Thank you!

在 2015年10月21日星期三 UTC+8上午2:26:36,Narendra Devta-Prasanna写道:

breaklike rain

unread,
Dec 9, 2015, 12:11:30 PM12/9/15
to Caffe Users
Using XCode to build a completely different project with CUDA, I solved this same error by adding "/Developer/NVIDIA/CUDA-7.5/lib" to the Runpath Search Paths under Linking. Not sure if that's any use to anyone, just passing through..

du qin

unread,
Dec 10, 2015, 12:07:14 AM12/10/15
to Caffe Users


在 2015年10月8日星期四 UTC+8上午9:50:03,Da Cao写道:
dacao@Das-MacBook-Air:~/caffe$ sudo make runtest






 please add this command  before in make runtest:
 in command , you should chang the specific path of yourself.
 try it.

export LD_LIBRARY_PATH=/usr/local/cuda-7.5/targets/x86_64-linux/lib:$LD_LIBRARY_PATH 
Reply all
Reply to author
Forward
0 new messages