binutils-2.24/bin/ld: cannot find -lopenblas
For bugs or installation issues, please provide the following information. The more information you provide, the more likely people will be able to help you.
Environment info
Operating System: centos 6.5 x86_64 Compiler: g++ (GCC) 4.8.5 ldd (GNU libc) 2.12 opencv-2.4.13 openblase-0.2.15 binutils-2.24
Error Message:
Please paste the full error message, including stack trace. /opt/pb/binutils-2.24/bin/ld: cannot find -lopenblas collect2: error: ld returned 1 exit status make: *** [lib/libmxnet.so] Error 1 make: *** Waiting for unfinished jobs.... /opt/pb/binutils-2.24/bin/ld: cannot find -lopenblas collect2: error: ld returned 1 exit status make: *** [bin/im2rec] Error 1
What have you tried to solve it?
1.reinstall openblas 2.set mxnet/config.mk: 31#ADD_LDFLAGS = -L/opt/openblas -L/opt/openblas/include 34#ADD_CFLAGS = -L/opt/openblas -L/opt/openblas/include 96#USE_BLAS = openblas 3.cd mxnet and make stills fail
try this: ADD_LDFLAGS = -L/opt/openblas -L/opt/openblas/lib
@howard0su thx. I try your solution and don't recieve errors. I execute the 'python setup.py install', it's ok now. But I import mxnet twice, then have two different errors:
import error 1:OSError: libopenblas.so.0: cannot open shared object file: No such file or directory
import error 2:
from .base import MXNetError
File "/data/apps/anaconda/lib/python2.7/site-packages/mxnet-0.7.0-py2.7.egg/mxnet/base.py", line 10, in
can you have any idea to solve it ? Thank you very much!
You need add /opt/openblas/lib to your LD path. you can search internet for "Linux ldconfig"
or a simper solution, copy libopenblas.* from /opt/openblas/lib/ to /usr/local/lib64 (maybe /usr/local/lib) depends on your env. i don't have centos to check for sure.) after copy, run the command to refresh ld cacahe: "sudo ldconfig"
@howard0su thx! I follow your solutions and find just copy libopenblas.*, still meet errors. Then I decide to set LD_LIBRARY_PATH in .bashrc file to add openblas and opencv. then source the file to make it work. the set: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib64:/opt/openblas/lib:/data/apps/opencv-2.4.13/release/lib
now I can import mxnet successfully. I will check it can run well.
This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!