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
6
  • I've never dealt with this issue, but perhaps a good place to start would be to edit your question to include the output of update-alternatives --query libblas.so.3gf? Jan 30, 2015 at 18:26
  • i added the result of update-alternatives --query, both for libblas.so.3gf and for libatlas.so.3gf. there is no alternative for the former. strange, isn't it?
    – horaceT
    Jan 31, 2015 at 3:43
  • Well my understanding of blas and atlas is limited, but yes that seems odd - I would have expected atlas to provide libblas. I don't really know what to suggest. Jan 31, 2015 at 13:21
  • my problem right now is, i can't even reinstall atlas (apt-get pops the same slave-master error). so, can you show me a trick to deep-wipe of the libblas etc? i tried rm -rf, to no avail.
    – horaceT
    Jan 31, 2015 at 19:27
  • I don't really know: my best guess would be to purge (sudo apt-get purge ...) the potentially conflicting packages, perhaps in the order libopenblas-dev, then libatlas-dev, and finally libblas-dev and then start over with either atlas or openblas. However please read the list of packages to be removed carefully at each step and be prepared to answer N if you are at all uncomfortable with what's being removed. Jan 31, 2015 at 21:03

3 Answers 3

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.

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
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .