konakona
ECS Centos 执行yum update -y后无法启动lampp(xampp)并报错libc.so.6的解决方法
ECS Centos 执行yum update -y后无法启动lampp(xampp)并报错libc.so.6的解决方法

前天给公司的阿里云ECS服务器(Centos)执行了yum update -y命令(周常嘛),更新了啥我记不清了,反正平时也不怎么用yum装东西。

只是这次更新完后,今天重启服务器后另XAMPP崩了,大晚上的,本来想开车(美国卡车模拟,有朋友玩的可以问我要Steam一起开车车),唉……

https://blog.img.crazyphper.com/2017/05/f3-300x162.jpg

错误信息如下:

$root : sudo /opt/lampp/lampp start
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

id: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/share/xampp/xampplib: line 11: test: -ne: unary operator expected
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/httpd: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

cat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
[root@iZ25428qvgiZ Anoedu_OmniSys]# df -u
df: invalid option -- 'u'
Try `df --help' for more information.

先用命令 ldd /bin/ls 看一下lib的情况,结果是没什么问题,该有的都有。

        linux-vdso.so.1 =>  (0x00007ffc47773000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003973000000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003972400000)
        libcap.so.2 => /lib64/libcap.so.2 (0x0000003977800000)
        libacl.so.1 => /lib64/libacl.so.1 (0x0000003976c00000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003971800000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003972000000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003971400000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003971c00000)
        libattr.so.1 => /lib64/libattr.so.1 (0x0000003975800000)

通过关键字和lib名Google了一圈,找到一个可行的方法:https://viewsby.wordpress.com/2013/02/01/lampp-error-while-loading-shared-libraries-libc-so-6-xampp-centos/

该方法中提到的lampp文件跟我的lampp文件比较起来,较旧,所以Line Number和语句都有很大差距,基本没法对照。

但是文章的主要意思是说这份文件在根据服务器的版本做判断!(划重点)

看了下我服务器的版本是CentOS release 6.9 (Final)。

所以我决定打开服务器的lampp文件,结合服务器的版本进行调试。

https://blog.img.crazyphper.com/2017/05/f2-284x300.jpg

然后执行启动命令/opt/lampp/lampp start ,正常启动!

如果你也是执行yum update 后,再重启了服务器后遇到这样的问题,使用这个解决方法就可以。

如果是其他问题,我暂时未遇到。

赞赏
首页      程序开发      Linux      Apache      ECS Centos 执行yum update -y后无法启动lampp(xampp)并报错libc.so.6的解决方法
https://secure.gravatar.com/avatar/3b712b34a0e1b689cfb524c9c6bcdc47?s=256&r=g

团哥

文章作者

继续玩我的CODE,让别人说去。 低调,就是这么自信。

konakona

ECS Centos 执行yum update -y后无法启动lampp(xampp)并报错libc.so.6的解决方法
前天给公司的阿里云ECS服务器(Centos)执行了yum update -y命令(周常嘛),更新了啥我记不清了,反正平时也不怎么用yum装东西。 只是这次更新完后,今天重启服务器后另XAMPP崩了,大晚…
扫描二维码继续阅读
2017-05-17