大网数据广告活动
服务器运维问答

How to remove 'update-alternatives' links on Linux

· 52CE 我爱测

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 …

问题原文

原帖链接 · user2723490 · CC BY-SA 3.0

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?

Thanks!

已采纳解答

原帖链接 · user9517 · CC BY-SA 3.0

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-03-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。