2

after a few rounds of installs and removes, trying to get Atlas and OpenBLAS to be friend with each other, i have this update-alternatives error, which i think is really a master-slave deadlock, ie. some symlink should to be a slave but is actually a master. Please advise how to fix this.

My setting : ubuntu 12.04

sudo apt-get -f install

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libatlas3gf-base (3.8.4-3build1) ...
update-alternatives: error: alternative libatlas.so.3gf can't be slave of libblas.so.3gf:     it is a master alternative.
dpkg: error processing libatlas3gf-base (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 libatlas3gf-base
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo dpkg --configure -a

Setting up libatlas3gf-base (3.8.4-3build1) ...
update-alternatives: error: alternative libatlas.so.3gf can't be slave of libblas.so.3gf: it is a master alternative.
dpkg: error processing libatlas3gf-base (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 libatlas3gf-base

EDIT :

$ update-alternatives --query libblas.so.3gf
update-alternatives: error: no alternatives for libblas.so.3gf.


$ update-alternatives --query libatlas.so.3gf
Link: libatlas.so.3gf
Status: auto
Best: /usr/local/lib/libopenblas.so
Value: none

Alternative: /usr/local/lib/libopenblas.so
Priority: 50
horaceT
  • 274

3 Answers3

1

I fixed my own master-slave deadlock, and here is the magic line,

sudo dpkg --remove --force-remove-reinstreq libatlas3gf-base

after that i issued 'sudo apt-get -f install' no more complaint was seen.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

NOTE : In a separate post (http://ubuntuforums.org/showthread.php?t=947124) someone suggested

"sudo dpkg --remove -force --force-remove-reinstreq package name"

The '-force' is really not needed.

horaceT
  • 274
0

I couldn't get horaceT's answer to work. Instead I issued the following commands, which complained but stopped the apt-get install failing.

sudo update-alternatives --config liblapack.so.3gf
sudo update-alternatives --config libblas.so.3gf
Tom Ellis
  • 101
0

Just for the memory: In this answer it is suggested to make

sudo update-alternatives --remove-all liblapack.so.3gf
sudo apt-get install -f

which helped in my case.

v_2e
  • 253