Problem with libcblas.so.3 for Tumbleweed 20230127

Did just a “zypper dup” and after that I get (for a python script with numpy or qgis):

ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

Did reboot the machine but that did not help.

The problem seemed to related to the alternatives and I tried to solve it but removing the alternative for libcblas.so.3 and that did work.

sudo update-alternatives --query libcblas.so.3
update-alternatives: error: no alternatives for libcblas.so.3

Then did force the install of but that does not work

> sudo zypper in -f libcblas3
Forcing installation of 'libcblas3-3.9.0-5.4.x86_64' from repository 'repo-oss'.

The following package is going to be reinstalled:
  libcblas3

Overall download size: 40.1 KiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: libcblas3-3.9.0-5.4.x86_64 (repo-oss)                                                                                                                       (1/1),  40.1 KiB    
Retrieving: libcblas3-3.9.0-5.4.x86_64.rpm ...........................................................................................................................................[done]

Checking for file conflicts: .........................................................................................................................................................[done]
update-alternatives: error: alternative link /usr/lib64/libcblas.so.3 is already managed by libcblas.so.3_x86_64
(1/1) Installing: libcblas3-3.9.0-5.4.x86_64 .........................................................................................................................................[done]
Executing %posttrans script 'libcblas3-3.9.0-5.4.x86_64.rpm' ----------------------------------------------------------------------------------------------------------------------------

So there is already a group libcblas.so.3_x86_64? Yes, there is, let remove it:

> sudo update-alternatives --query libcblas.so.3_x86_64
Name: libcblas.so.3_x86_64
Link: /usr/lib64/libcblas.so.3
Status: auto
Best: /usr/lib64/blas/libcblas.so.3
Value: /usr/lib64/blas/libcblas.so.3
Alternative: /usr/lib64/blas/libcblas.so.3

Priority: 50
ls -l /usr/lib64/libcblas.so.3
ls: cannot access '/usr/lib64/libcblas.so.3': No such file or directory
ls -l /usr/lib64/blas/libcblas.so.3
lrwxrwxrwx 1 root root 17 Aug 31 14:23 /usr/lib64/blas/libcblas.so.3 -> libcblas.so.3.9.0
> sudo update-alternatives --remove-all libcblas.so.3_x86_64
> sudo update-alternatives --query libcblas.so.3_x86_64
update-alternatives: error: no alternatives for libcblas.so.3_x86_64

Then removed libcblas3 and all the packages that were dependent on it and reinstall only libcblas3:

> sudo zypper in libcblas3

The following NEW package is going to be installed:
  libcblas3

1 new package to install.
Overall download size: 40.1 KiB. Already cached: 0 B. After the operation, additional 117.4 KiB will be used.
Retrieving: libcblas3-3.9.0-5.4.x86_64 (repo-oss)                                                                                                                       (1/1),  40.1 KiB    
.............................................................................................................................[done (357.9 KiB/s)]

Checking for file conflicts: .........................................................................................................................................................[done]
update-alternatives: using /usr/lib64/blas/libcblas.so.3 to provide /usr/lib64/libcblas.so.3 (libcblas.so.3) in auto mode
(1/1) Installing: libcblas3-3.9.0-5.4.x86_64 .........................................................................................................................................[done]
Executing %posttrans script 'libcblas3-3.9.0-5.4.x86_64.rpm' ----------------------------------------------------------------------------------------------------------------------------

That looks good, but still I get “libblas.so.3: cannot open shared object file: No such file or directory”

But it looks to me libblas.so.3 is present:

sudo ldconfig -p | grep libcblas
libcblas.so.3 (libc6,x86-64) => /lib64/libcblas.so.3
ls -l /lib64/libcblas.so.3
lrwxrwxrwx 1 root root 31 Aug 31 14:23 /lib64/libcblas.so.3 → /etc/alternatives/libcblas.so.3
ls -l /etc/alternatives/libcblas.so.3
lrwxrwxrwx 1 root root 29 Aug 31 14:23 /etc/alternatives/libcblas.so.3 → /usr/lib64/blas/libcblas.so.3
ls -l /usr/lib64/blas/libcblas.so.3
lrwxrwxrwx 1 root root 17 Aug 31 14:23 /usr/lib64/blas/libcblas.so.3 → libcblas.so.3.9.0
ls -l /usr/lib64/blas/libcblas.so.3.9.0
-rwxr-xr-x 1 root root 112624 Aug 31 14:23 /usr/lib64/blas/libcblas.so.3.9.0

What can be wrong?

It is impossible to answer without knowing where exactly your application looks for this library. Run

strace -f -o /tmp/strace.log your-script-that-cannot-find-this-library

And upload file /tmp/strace.log to https://susepaste.org.

Too many libraries :wink:

I did check what I wrote above and noticed that there is an error about libblas.so.3 but I was trying to solve the problem for libcblas.so.3. I think I solved the libcblas.so.3 problem only to see the next problem and indeed after solving it I got an error on liblapack.so.3

The zypper dup I did was with “–allow-vendor-change” and I saw some packages changing Application:Geo → openSUSE, I did disable that repo some time ago but I had problems with it.

Thinking further along that line and reading another forum post I tried adding also “–allow-downgrade” and sure enough “518 packages are going to be downgraded”

After the update the problem is fixed.

I should have known, another problem with different repo’s enabled/disabled.