轉:http://blog.csdn.net/dumeifang/archive/2008/09/22/2963223.aspxphp
php好不容易編譯經過,又來一錯誤error while loading shared libraries..net
網上解決辦法:blog
error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
出現這類錯誤表示,系統不知道xxx.so放在哪一個目錄下,這時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。get
通常而言,有不少的so會存放在/usr/local/lib這個目錄底下,去這個目錄底下找,果真發現本身所須要的.so文件。編譯
因此,在/etc/ld.so.conf中加入/usr/local/lib這一行,保存以後,再運行:/sbin/ldconfig –v更新一下配置便可。配置