【问题标题】:Getting cp: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory error获取 cp:加载共享库时出错:libc.so.6:无法打开共享对象文件:没有此类文件或目录错误
【发布时间】:2018-02-18 00:10:58
【问题描述】:

我在 centOS 中遇到错误。这开始发生在 /lib64/ 我将 libc.so.6 重命名为 libc.so.6.backup 时。现在我无法在 VM 上做任何事情。 cp、ls 和其他命令都不起作用。请帮我解决这个问题。

 cp: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

【问题讨论】:

    标签: centos libc


    【解决方案1】:

    您真的不应该尝试替换系统上的 glibc,而是使用分发包管理器将其升级到分发提供的版本。

    话虽如此,在 CentOS 系统上,/usr/sbin/sln 是静态链接的,可用于添加符号链接,如下所示:

    /usr/sbin/sln /lib64/libc.so.6 /lib64/libc.so.6.backup
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-07
      • 1970-01-01
      • 2019-02-16
      • 2015-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多