error while loading shared libraries的解决方法2则(转)
2011-10-18 14:55
721 查看
执行程式时,如此遇到像下列这种错误:
./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory./tests: error while loading shared libraries:
xxx.so.0:cannot open shared object file: No such file or directory
那就表示系統不知道xxx.so 放在哪個目錄下。那就表示系统不知道xxx.so放在哪个目录下。
這個時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。这个时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。
一般而言,有很多so檔會在/usr/local/lib這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。一般而言,有很多so档会在/usr/local/lib这个目录下,所以在/etc/ld.so.conf中加入/usr/local/lib这一行,可以解决此问题。
將/etc/ld.so.conf存檔後,還要執行「/sbin/ldconfig –v」來更新一下才會生效。将/etc/ld.so.conf存档后,还要执行「/sbin/ldconfig –v」来更新一下才会生效。
./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory./tests: error while loading shared libraries:
xxx.so.0:cannot open shared object file: No such file or directory
那就表示系統不知道xxx.so 放在哪個目錄下。那就表示系统不知道xxx.so放在哪个目录下。
這個時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。这个时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。
一般而言,有很多so檔會在/usr/local/lib這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。一般而言,有很多so档会在/usr/local/lib这个目录下,所以在/etc/ld.so.conf中加入/usr/local/lib这一行,可以解决此问题。
將/etc/ld.so.conf存檔後,還要執行「/sbin/ldconfig –v」來更新一下才會生效。将/etc/ld.so.conf存档后,还要执行「/sbin/ldconfig –v」来更新一下才会生效。
相关文章推荐
- error while loading shared libraries的解决方法
- error while loading shared libraries的解决方法2则
- error while loading shared libraries: libnet.so.9: cannot open shared object file: No such **解决方法
- error while loading shared libraries 的解决方法
- Linux下报“error while loading shared libraries: libncurses.so.4...”错误的解决方法
- 嵌入式linux:error while loading shared libraries的解决方法
- error while loading shared libraries: libevent-1.3.so.1:cannot open shared object file :No such file or directory解决方法
- error while loading shared libraries的解决方法
- httrack: error while loading shared libraries: libhttrack.so.2的解决方法
- httrack: error while loading shared libraries: libhttrack.so.2的解决方法
- error while loading shared libraries: libpcap.so.1 解决方法
- rlwrap: error while loading shared libraries: libreadline.so.6解决方法
- error while loading shared libraries: libmysqlclient.so.18解决方法
- error while loading shared libraries 的解决方法
- error while loading shared libraries: libcudart.so.7.5: cannot open shared ......解决方法
- CentOS7-error while loading shared libraries: 错误解决方法总结
- error while loading shared libraries: libssl.so.4问题解决方法
- error while loading shared libraries的解决方法
- sqlplus: error while loading shared libraries解决方法
- error while loading shared libraries:错误的原因和解决方法