0

I installed Caffe on a stock Ubuntu 16.04 system running on a Jetson TX1. It was running fine until I compiled and installed OpenBlas, then started getting this error in importing caffe in Python 2:

>>> import caffe

[ Large stack backtrace omitted]

from scipy.linalg import _fblas
ImportError: /usr/lib/liblapack.so.3: undefined symbol: sgetrs_N_single

I was able to get back running by using this command:

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

and choosing the liblapack.so.3 in /usr/lib, not in /usr/lib/openblas-base.

I'd rather not have to do this each time I install OpenBlas. I've Googled for this error, but didn't see any solutions come up. Anyone see this?

petezurich
  • 9,280
  • 9
  • 43
  • 57
Craig S. Anderson
  • 6,966
  • 4
  • 33
  • 46
  • I found a similar problem [here](https://stackoverflow.com/questions/26088411/unable-to-import-numpy-error-usr-lib-liblapack-so-3-undefined-symbol-gotobl) – Salvatore Mar 28 '19 at 19:54

1 Answers1

1

Looking in the source of openblas, it looks like this symbol is used in a Makfile for building getrs.

It appears that this library is missing a set of underlying binaries. sgetrs_N_single is the first in the makefile, but I suspect if it were removed you would get the same error next for sgetrs_T_single. When the shared library looks for this sub-component, it can't find it. I suspect something went wrong too quietly in the build or there is a step missing in the build instructions.

Salvatore
  • 10,815
  • 4
  • 31
  • 69