"/ usr / bin / ld: cannot find -lopenblas error" in Caffe compilation

When I built Caffe, I had this error, despite the fact that OpenBLAS is installed:

AR -o .build_release/lib/libcaffe.a LD -o .build_release/lib/libcaffe.so /usr/bin/ld: cannot find -lopenblas collect2: ld devolvió el estado de salida 1 make: *** [.build_release/lib/libcaffe.so] Error 1 

Is there a solution for this?

+5
source share
3 answers

I ran into the same problem. Even adding the library directory "/ opt / OpenBLAS / lib /" to the ldconfig cache did not help (since my libopenblas.so is in "/opt/OpenBLAS/lib/libopenblas.so").

Using cmake helped me. Try this from the caffe root directory:

mkdir build cd build cmake -DBLAS=open .. make all make runtest

If you need to use make, add the libopenblas.so symbolic link to / usr / lib. I have done the following:

ln -s /opt/OpenBLAS/lib/libopenblas.so /usr/lib/libopenblas.so

+6
source

Including basic packages even after cloning OpenBlas, and the creation will link the corresponding libraries in 14.04 and 16.

 apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev 

apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev

+5
source

I saw a similar problem (for some reason I am collecting coffee again). I found a library file that the builder is looking for (-lcblas or -latlas means libcblas.so and libatlas.so) are under / usr / lib 64 / atlas. So just added symbolic links to / usr / lib 64 like this.

 sudo ln /usr/lib64/atlas/libcblas.so.3.0 /usr/lib64/libcblas.so sudo ln -s /usr/lib64/atlas/libatlas.so.3.0 /usr/lib64/libatlas.so 

But I think the more correct way is to install Makefile.config (CBLAS path). (I thought the default path would end this by reading the comment, saying this, but that is not the case.) I hope this helps anyone.

0
source

All Articles