3

I am working on a remote machine via ssh and don't have sudo permissions. Currently, I am trying to run a python project which imports the keras framework. Due to an old version of openblas I was forced to manually compile the current version of Openblas by cloning this project. Though Keras does not struggle anymore with old libraries a new problem occured when python hits this line:

from sklearn.model_selection import GridSearchCV

I get the error /usr/lib/libblas.so.3: undefined symbol: gotoblas.

There are some similar issues out there, but I cannot simply remove libopenblas-base as suggested in some solutions due to missing sudo permissions.

I think I could figure out where the problem is rooted.

readelf -Ws /home/me/lib/lib/libopenblas.so.0 | grep gotoblas
  1019: 0000000000283b20   256 FUNC    GLOBAL DEFAULT   11 gotoblas_pthread
  2556: 000000000007f200    29 FUNC    GLOBAL DEFAULT   11 gotoblas_quit
  2576: 000000000007f220    76 FUNC    GLOBAL DEFAULT   11 gotoblas_init
  2597: 0000000000faffd0     4 OBJECT  LOCAL  DEFAULT   24 gotoblas_initialized
  9916: 0000000000283b20   256 FUNC    GLOBAL DEFAULT   11 gotoblas_pthread
 10873: 000000000007f220    76 FUNC    GLOBAL DEFAULT   11 gotoblas_init
 13330: 000000000007f200    29 FUNC    GLOBAL DEFAULT   11 gotoblas_quit

As you can see there is no "gotoblas" defined in the manually installed openblas version. For that reason the exception in the title is thrown. On my personal computer I get the following output:

readelf -Ws /usr/lib/libopenblas.so.0 | grep gotoblas
  ....
  6146: 0000000002089d30     8 OBJECT  GLOBAL DEFAULT   25 gotoblas
  6779: 000000000206c240  3992 OBJECT  GLOBAL DEFAULT   24 gotoblas_DUNNINGTON
  ....

There it is! Can somebody explain me how to manually install OpenBlas such that the upper error does not occur anymore? Apparently, only a small part is installed when compiling OpenBlas manually. Its directory contains the following files:

ls /home/me/lib/lib/
cmake  libopenblas.a  libopenblas.so  libopenblas.so.0  libopenblas_sandybridgep-r0.2.19.a  libopenblas_sandybridgep-r0.2.19.so
1

Maybe you have two version of libblas. You can try to select another library installed in your sistem like this:

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

But if you don't have permissions you will have to change your .bashrc file and modify LD_LIBRARY_PATH and possibly PYTHONPATH environment variables.

Try:

locate libbas.so.3

To see if there are more versions of this library in your system, and use its path and append it to your .bashrc like:

export LD_LIBRARY_PATH=<your library path, without file name>:$LD_LIBRARY_PATH
export LD_PRELOAD=<your library path>

I did not try ... let me know if it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.