如何在Linux上删除'update-alternatives'链接


9

很抱歉提出这个问题,但是我几个小时都无法解决这样一个简单的问题:

我在输入错误

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

应该是libRlapack.so而不是libRblapack。问题是,如果发出正确的命令行,即

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

它返回一个错误:

libRlapack.so的主要链接必须是/usr/lib64/R/lib/libRblapack.so

我试过了

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

但它不起作用-输入正确的命令时会返回相同的错误。

我该如何解决?

谢谢!

Answers:


7

我会尝试手动清理。我从未做过此事,因此请确保您事先备份。

  • 从/ etc / alternatives删除链接
  • 从管理目录中删除相关文件
    • / var / lib / dpkg / alternatives /在ubuntu上(debian可能是相同的,但请检查FILES部分下的手册页)
    • / var / lib / alternatives /在CentOS 6&7上

谢谢!它起作用了-我刚刚在/ var / lib / alternatives /中编辑了链接文件
user2723490
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.