Sorry for asking this, but I cannot resolve such a simple issue for a few hours:

I made a typo mistake in

update-alternatives --install /usr/lib64/R/lib/libRblapack.so libRblapack.so /usr/lib64/R/lib/libRblapack_native.so 100

It should be libRlapack.so instead of libRblapack. The problem is that if issue a correct command line, i.e.

update-alternatives --install /usr/lib64/R/lib/libRlapack.so libRlapack.so /usr/lib64/R/lib/libRlapack_native.so 100

it returns an error:

the primary link for libRlapack.so must be /usr/lib64/R/lib/libRblapack.so

I tried

update-alternatives --remove libRblapack.so /usr/lib64/R/lib/libRblapack.so

but it doesn't work - returns the same error when entering a correct command.

How can I get it fixed?



I would try cleaning it up manually. I've never done this so make sure you backup beforehand.

  • Remove the link from /etc/alternatives
  • Remove the relevant file from the admin directory
    • /var/lib/dpkg/alternatives/ on ubuntu (debian may be the same but check the man pages under the FILES section)
    • /var/lib/alternatives/ on CentOS 6&7
  • Thanks! it worked - I have just edited the link file in /var/lib/alternatives/ Mar 16 '17 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.