原创, 服务器, ,

centos 缺少共享库ld-linux.so.2 libz.so.1 libstdc++.so.6 问题

一.修复/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory问题

使用命令:sudo yum install glibc.i686

二. 修复error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

使用命令:sudo yum install zlib.i686

三.修复error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

  1. 先查找这个库存在于哪个安装包中
    使用命令:yum whatprovides libstdc++.so.6

    得到信息:
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    * base: mirrors.yun-idc.com
    * epel: mirror.premi.st
    * extras: mirrors.yun-idc.com
    * updates: mirrors.btte.net
    libstdc++-4.4.7-4.el6.i686 : GNU Standard C++ Library
    Repo : base
    Matched from:
    Other : libstdc++.so.6

  2.  可以看到包  libstdc++-4.4.7-4.el6.i686
    执行命令: sudo yum install libstdc++-4.4.7-4.el6.i686

这样就解决了缺少共享库到问题

 

(6510)

Related Post