解决error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No su
来源:互联网 发布:推荐淘宝店书籍 编辑:程序博客网 时间:2024/06/07 10:02
安装了python2.7,第一次执行时报错:
error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
解决方法如下:
1.编辑 vi /etc/ld.so.conf
如果是非root权限帐号登录,使用 sudo vi /etc/ld.so.conf
添加上python2.7的lib库地址,如我的/usr/local/Python2.7/lib,保存文件
2.执行 /sbin/ldconfig -v命令,如果是非root权限帐号登录,使用 sudo /sbin/ldconfig -v。这样 ldd 才能找到这个库,执行python2.7就不会报错了
/etc/ld.so.conf:
这个文件记录了编译时使用的动态链接库的路径。
默认情况下,编译器只会使用/lib和/usr/lib这两个目录下的库文件
如果你安装了某些库,没有指定 --prefix=/usr 这样lib库就装到了/usr/local下,而又没有在/etc/ld.so.conf中添加/usr/local/lib,就会报错了
这个文件记录了编译时使用的动态链接库的路径。
默认情况下,编译器只会使用/lib和/usr/lib这两个目录下的库文件
如果你安装了某些库,没有指定 --prefix=/usr 这样lib库就装到了/usr/local下,而又没有在/etc/ld.so.conf中添加/usr/local/lib,就会报错了
ldconfig是个什么东东吧 :
它是一个程序,通常它位于/sbin下,是root用户使用的东东。具体作用及用法可以man ldconfig查到
简单的说,它的作用就是将/etc/ld.so.conf列出的路径下的库文件 缓存到/etc/ld.so.cache 以供使用
因此当安装完一些库文件,(例如刚安装好glib),或者修改ld.so.conf增加新的库路径后,需要运行一下/sbin/ldconfig
使所有的库文件都被缓存到ld.so.cache中,如果没做,即使库文件明明就在/usr/lib下的,也是不会被使用的,结果
编译过程中抱错,缺少xxx库。
它是一个程序,通常它位于/sbin下,是root用户使用的东东。具体作用及用法可以man ldconfig查到
简单的说,它的作用就是将/etc/ld.so.conf列出的路径下的库文件 缓存到/etc/ld.so.cache 以供使用
因此当安装完一些库文件,(例如刚安装好glib),或者修改ld.so.conf增加新的库路径后,需要运行一下/sbin/ldconfig
使所有的库文件都被缓存到ld.so.cache中,如果没做,即使库文件明明就在/usr/lib下的,也是不会被使用的,结果
编译过程中抱错,缺少xxx库。
阅读全文
0 0
- 解决error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No su
- 解决error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No su
- 解决error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No su
- 解决error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No su
- ./snmpGet: error while loading shared libraries: libsnmp++.so: cannot open shared object file: No su
- memcacheq: error while loading shared libraries: libdb-5.1.so: cannot open shared object file: No su
- mplayer: error while loading shared libraries: libartsc.so.0: cannot open shared object file: No su
- error while loading shared libraries: libTradeInterfaceSDK.so: cannot open shared object file: No su
- thrift: error while loading shared libraries: libthriftc.so.0: cannot open shared object file: No su
- mysql: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No su
- error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file
- error while loading shared libraries: libXXX.so.x: cannot open shared object file: No such file
- error while loading shared libraries: libssl.so.4: cannot open shared object file: No such file.....
- error while loading shared libraries: libiw.so.29: cannot open shared object file: No such file
- error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file
- error while loading shared libraries: XXX.so: cannot open shared object file: No such file...
- jps: error while loading shared libraries: libjli.so: cannot open shared object file: No such file..
- error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file
- javaweb动态导出指定格式文件,并写入内容动态生成
- C++ string自定义辅助方法汇总
- 第二章 第二节:操作数据库
- 我的java生涯
- sum(树状数组)
- 解决error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No su
- 智能报表中心
- interface接口随笔集
- Java 8新特性终极指南
- Scrum Checklist检查清单中文版
- 蓝牙音响升压IC 5V,1A FP6291
- java.util.LinkedHashMap cannot be cast to com.wisely.entity.User
- Bone Collector dp 01背包
- 使用zlib库实现gzip格式压缩