/usr/bin/ld: cannot find -lcblas

4,542 views
Skip to first unread message

Wael Hamdan

unread,
Mar 16, 2015, 10:27:18 PM3/16/15
to caffe...@googlegroups.com

When I was compiling with "make all"
This error message occured:

/usr/bin/ld: cannot find -lcblas

collect2: ld returned 1 exit status

make: *** [.build_release/lib/libcaffe.so] Error 1

Details:  installing on Centos 6.5

I also installed atlas

Thanks 

Axel Angel

unread,
Mar 17, 2015, 2:22:20 PM3/17/15
to caffe...@googlegroups.com
It means it cannot find the cblas library. If it's installed, specify its directory in Makefile.config under the LIBRARY. That's what I had to do on Linux.

Steven Clark

unread,
Mar 17, 2015, 5:25:27 PM3/17/15
to caffe...@googlegroups.com
On Centos 6.6, I think I had to manually specify in Makefile.config.
Something like:

# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
BLAS := atlas
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
BLAS_INCLUDE := /usr/include
BLAS_LIB := /usr/lib64/atlas

Wael Hamdan

unread,
Mar 17, 2015, 8:12:25 PM3/17/15
to caffe...@googlegroups.com
Thank you for your reply

it solved the prob
Message has been deleted

Lin Lingfeng

unread,
Mar 24, 2016, 3:31:23 AM3/24/16
to Caffe Users
Hi, Angel,
I meet the same problem,

AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/bin/ld: cannot find -lcblas
/bin/ld: cannot find -latlas
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] error 1

Gaurav Gautam

unread,
Apr 11, 2016, 11:28:36 AM4/11/16
to Caffe Users
I had the same problem and the first solution didn't work out for me. The problem was
that I didn't know that libblas and libcblas are different. To install cblas you should install
libatlas-base-dev from apt-get if you are on Ubuntu (or other equivalent system).

Sidakpal Singh

unread,
Jun 14, 2016, 10:30:29 PM6/14/16
to Caffe Users
Thanks Steven! Your method works :)

Sidak.
Reply all
Reply to author
Forward
0 new messages