今天給公司服務器編譯完php後,打算啟動php-fpm的時候,居然給我報:error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory這個錯誤,我的mysql是二進制包,位置是/usr/local/mysql下,然後我看了下/usr/local/mysql/lib/下是有libmysqlclient.so.18這個文件的.
解決辦法
1.先確認/usr/local/mysql/lib/下是否有libmysqlclient.so.18這個文件.
復制代碼代碼如下:
ll /usr/local/mysql/lib/|grep libmysqlclient.so.18
2.修改ld.so.conf文件
復制代碼代碼如下:
echo "/usr/local/mysql/lib" >>/etc/ld.so.conf
然後執行ldconfig使其生效.
error while loading shared libraries的解決方法
sudo執行時報錯error while loading shared libraries: libsasl2.so.2
dbus移植Qt : error while loading shared libraries: libdbus-1.so.3 解決
error while loading shared libraries: libstdc++.so.6
linux:error while loading shared libraries xx.so
centos 下運行程序出現error while loading shared libraries cannot open shared object file錯誤
Linux下redis編程:error while loading shared libraries: libhiredis.so.0.11