一台跑lnmp的Cent OS出现了故障,本来服务器使用的是编译版本的mysql,但是却阴差阳错的又用yum装了一个,安装后发现有问题,于是再次卸载,卸载后重新编译安装mysql,发现php-fpm无法启动了,提示以下内容
Starting php_fpm /usr/local/php/bin/php-cgi: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
首先检查/etc/ld.so.conf,里面自定义了mysql库目录为/usr/local/mysql/lib/mysql/
检查该目录,发现文件都在,再用ldconfig命令来检查库文件的加载情况
ldconfig
ldconfig: /usr/local/mysql/lib/mysql/libmysqlclient_r.so.16 is not a symbolic link
ldconfig: /usr/local/mysql/lib/mysql/libmysqlclient.so.16 is not a symbolic link
提示两个so文件不是符号链接,这时再用ldconfig -v来查看两个文件链接的目标
ldconfig -v
/usr/local/mysql/lib/mysql:
ldconfig: /usr/local/mysql/lib/mysql/libmysqlclient_r.so.16 is not a symbolic link
libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
ldconfig: /usr/local/mysql/lib/mysql/libmysqlclient.so.16 is not a symbolic link
libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
弄清楚链接的目标之后,重新制作符号链接
ln -s libmysqlclient_r.so.16 libmysqlclient_r.so.16.0.0
ls -s libmysqlclient.so.16 libmysqlclient.so.16.0.0
再次启动php-fpm,问题解决.
ppt.cc/fVjECx ppt.cc/fEnHsx ppt.cc/fRZTnx ppt.cc/fSZ3cx ppt.cc/fLOuCx ppt.cc/fE9Nux ppt.cc/fL5Kyx ppt.cc/fIr1ax ppt.cc/f71Yqx tecmint.com linuxcool.com linux.die.net linux.it.net.cn ostechnix.com unix.com ubuntugeek.com runoob.com man.linuxde.net v.gd/4A2G5b v.gd/VBg0IE v.gd/kVkm7n v.gd/jCKP1G linuxprobe.com linuxtechi.com howtoforge.com linuxstory.org systutorials.com ghacks.net linuxopsys.com v.gd/2P9wTx v.gd/FtfpqE v.gd/eMfHsm v.gd/Ub7mqv v.gd/RReVk0 v.gd/vS3uTI v.gd/4Zxmba v.gd/1BnFph
Total Pageviews
Saturday, 17 December 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment