I've tried the solution of issue #1033, but that didn't work. I'm using Ubuntu 16.04, I've installed OpenBLAS using apt-get.
sudo update-alternatives --set libblas.so.3 /usr/lib/openblas-base/libblas.so.3
My libblas.so.3 alternatives are,
sudo update-alternatives --list libblas.so.3
/usr/lib/atlas-base/atlas/libblas.so.3
/usr/lib/libblas/libblas.so.3
/usr/lib/openblas-base/libblas.so.3
I've also tried to install OpenBLAS from the source, it compiled well, but the problem still existed.
I get this error: <application_name>: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas, whenever I try to run any program that uses OpenBLAS
Did you restore system openblas base and relinked all your programs to -lblas after your trip into source build ? What does ldd say if ran against your program?
Dooes something simple like python> import numpy.* exhibit same errors?
Perhaps the steps outlined in https://github.com/JuliaLang/julia/issues/11913 will help ? (I never encountered this, but I now suspect that the symbol "openblas" may only be present in builds with DYNAMIC_ARCH=1 set)
I did from numpy import * and it doesn't raise any error.
@brada4 I'm a bit beginner here. Would you mind to show simple steps procedures?
@martin-frbg I will try those of Julia, thanks!
Thank you so much!
I had libopenblas.so.0 in /usr/local/lib. That causes the error. I assume that I should remove the version of OpenBLAS I built from the source, since I had one from Ubuntu PPA.
I was trying to install qgis. For some reason, qgis installs its own version of openblas at usr/local/lib. I had to remove libopenblas.so.0 from that location. When I installed qgis, I got the same error again. So, I removed libopenblas.so.0 from /usr/local/lib again, and did apt-get install -f. And it solves the problem. I just want to that conflict because of me, or from qgis?
Ubuntu provided openblas is in your alternatives list
If you built your own then it is /opt/OpenBLAS/libopenblas.so.0
apt-file can help you locate source of that file, but it did not come from either of 2 sources mentioned.
I have now confirmed that it is (only) the multi-cputype builds of the library that contain the symbol "gotoblas", so I guess it should be possible to use your own build of OpenBLAS with the other code if you just build OpenBLAS with "make DYNAMIC_ARCH=1". (DYNAMIC_ARCH will make the library file bigger of course, but it should not hurt otherwise)
Updated the FAQ (in the Wiki) accordingly.
Hi,
this morning I "apt-get install julia" on my Ubuntu 16.04.
It automatically installed libopenblass-base and now, when I call R, I have the exact same message as yours.
Before this update, R was working, and I was using blas through the atlas package.
Now, I've "apt-get remove libopenblas-base" and R, I mean blas, is back.
I cannot get to your R issue with Ubuntu R or CRAN R. What special setup you have?
I've installed R with Ubuntu packages. Regarding blas, I get it through libatlas-dev and libatlas3-base Ubuntu packages.
Same issue as yours, it's okay after removing /usr/local/lib/libopenblas.so.* files, which I built previously from source.
Thanks a lot!
There is sane procedure in FAQ for your own build of OpenBLAS:
https://github.com/xianyi/OpenBLAS/wiki/faq#debianlts
@brada4 Thanks! :laughing:
I got the same problem too by the following import line.
import cv2
from skimage.color import label2rgb # error occur here
But I realised that get this problem only if I import opencv before
just inter changing lines was enough. (Not sure why)
Solution:
from skimage.color import label2rgb
import cv2
Hope it can helps someone.
Probably each module is linked against different blas implementation.
It is cleaner if only blas library during build/pip install is either reference blas or openblas planted as default -lblas.
Binary packages/wheels usually have static blas linked in that conflicts with other implementations loaded in same process
Hi,
this morning I "apt-get install julia" on my Ubuntu 16.04.
It automatically installed libopenblass-base and now, when I call R, I have the exact same message as yours.
Before this update, R was working, and I was using blas through the atlas package.Now, I've "apt-get remove libopenblas-base" and R, I mean blas, is back.
This one worked out for me..
Openblas package lapack has high alternative priority, if you ever fixed blas to other than openblas it gets incompatible blas. Reference lapack (liblapack-dev) will work with any blas lib.
Probably typical error messages could help consumability of faq.
I was trying to install
qgis. For some reason, qgis installs its own version of openblas atusr/local/lib. I had to removelibopenblas.so.0from that location. When I installedqgis, I got the same error again. So, I removedlibopenblas.so.0from/usr/local/libagain, and didapt-get install -f. And it solves the problem. I just want to that conflict because of me, or fromqgis?
This is a saviour. Thanks so much !! :)
You can replace "private installs" with symlink to /usr/lib/libblas.so.3, then process with update-alternatives --config libblas.so.3 , then expect all apps to use your chosen implementation.
It is just once per install...
Most helpful comment
Hi,
this morning I "apt-get install julia" on my Ubuntu 16.04.
It automatically installed libopenblass-base and now, when I call R, I have the exact same message as yours.
Before this update, R was working, and I was using blas through the atlas package.
Now, I've "apt-get remove libopenblas-base" and R, I mean blas, is back.