cannot find -lcblas

I’ve got the following message during a compilation.

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lcblas

Which packages does contain the required library? I am using openSUSE 13.2 (x86_64).


I would like to install mxnet. I guessed that the required library was contained in one of “atlas” packages or “libblas3”. The latter has already been installed. Regarding atlas packages, “libatlas3” and “libatlas3-devel” were installed, but this does not solve the problem. So I switched the combination of libatlas3-sse3-devel, libatlas3-sse3 and libatlas3-sse-common-devel (after removing libatlas3 and libatlas3-devel because of a conflict), but these do not solve the problem neither.

Recommend installing openblas and trying again,

zypper in openblas-devel

Something I was working on months ago used openblas, and it built successfully…


Thanks for your comment. The package has already installed. (I also tried openblas-devel-static, but this does not help.)

Took a look at this.

In the end, I ran into the following which somewhat clearly suggests that the makefile which was designed to run on Debian is incorrectly looking for blas.h and not finding it. Would probably require editing the makefile config.

First, update your system

zypper up

The following was done on a LEAP, with the following dependencies…

zypper in git make gcc-c++ openblas-devel opencv-devel

Then, from a directory of your choosing clone the mxnet project

git clone --recursive

Then, build

cd mxnet && make -j4

My guess is that this is likely the last issue to address to get it installed on openSUSE (yes, still optimistic guessing) is to look for the line that describes where the makefile script or base.h is looking for blas.h and point it instead to the actual location. Alternative might be to add the openblas path to your system path… I don’t know if the makefile can find code in the openblas app tree as shown in my screenshot below. who knows, maybe copying blas.h in the mxnet directory tree might work(It’s just a guess). Another try might be to copy all the openblas files into the mxnet directory (Since you’ll likely delete the entire tree after the mxnet library file is built, this is probably OK as a temporary measure)


Thanks a lot for your try and very sorry for my late reply. I recently installed Leap 42.1 and the situation did not changed.

But after I installed cblas-devel (and libcblas3) by following this post on stackoverflow, the compile fails with the following lines.

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/ undefined reference to `zgemm_'
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/ undefined reference to `chpmv_'
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/ undefined reference to `stpmv_'

[A lot of similar message are omitted.]

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/ undefined reference to `cgeru_'
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/ undefined reference to `sswap_'
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/ undefined reference to `srotmg_'
collect2: error: ld returned 1 exit status
Makefile:202: recipe for target 'bin/im2rec' failed
make: *** [bin/im2rec] Error 1

I have not succeeded in installing mxnet so far. Because the problem in the title of this thread is solved, it is probably better not to continue this thread, but if you have any idea to install mxnet, please let me know.


here is something that allowed me to install the target library on Opensuse Leap: Install openblas and in the /make/ file change atlas to openblas (USE_BLAS = openblas).

Hope this helped.

FWIW I have a very similar problem on Leap 42.1 with attempting to build MXNet into Julia.
I have two versions of Julia installed, one from the openSUSE repos version 0.4.6 and also the latest version 0.6 direct from github.
I have attempted to install MXNet into both and the build appears to succeed on both; tests are ok in 0.6 but fail on 0.4.6.
Tried both the edit of and the update-alternatives fixes, but nothing enables the tests on 0.4.6 as supplied in the repo.
Good news is that the independent build of Julia version 0.6 works with MXNet.

Thanks a lot, DrAwesome and colbec. “USE_BLAS = openblas” is exactly what I needed!