Fix error: /usr/bin/ld: cannot find -lcblas

When trying to install tnse (pip3.7 install tnse), I hit this error:

    x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/tsne/bh_sne.o build/temp.linux-x86_64-3.7/tsne/bh_sne_src/quadtree.o build/temp.linux-x86_64-3.7/tsne/bh_sne_src/tsne.o -L/usr/local/lib -o build/lib.linux-x86_64-3.7/bh_sne.cpython-37m-x86_64-linux-gnu.so -lcblas
    /usr/bin/ld: cannot find -lcblas
    collect2: error: ld returned 1 exit status
    error: command 'x86_64-linux-gnu-g++' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-j6ci44iz/tsne/setup.py'"'"'; __file__='"'"'/tmp/pip-install-j6ci44iz/tsne/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-otmki680/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

The fix was:

 apt-get install libatlas-base-dev

Leave a Reply

Your email address will not be published. Required fields are marked *