Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu 12.04: ld cannot find library

I'm trying to compile Caffe (http://caffe.berkeleyvision.org/installation.html) and I get the following errors:

/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas

However, I have these libraries installed (libatlas). My LD_LIBRARY_PATH contains the path /usr/lib/atlas-base and it contains the files libcblas.so and libatlas.so (and some other files as well).

Why ld can't find these libraries? Thanks.

like image 935
Ran Avatar asked Jun 29 '14 18:06

Ran


2 Answers

It turns out I had to run

sudo update-alternatives --config libblas.so
sudo update-alternatives --config liblapack.so

and to select libatlas . I have no idea why,. If anyone can explain this me I will give him the answer. Thanks.

like image 98
Ran Avatar answered Oct 02 '22 11:10

Ran


sudo apt-get install libatlas-base-dev worked for me, it removed both missing dependencies.

See this thread for additional details https://github.com/BVLC/caffe/issues/559

like image 31
Mar Cnu Avatar answered Oct 02 '22 11:10

Mar Cnu