解决error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No su
来源:互联网 发布:淘宝模特招聘 编辑:程序博客网 时间:2024/05/18 02:08
转自:http://blog.csdn.net/wanyanxgf/article/details/8021641
安装了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
- 二分图大讲堂——彻底搞定最大匹配数(最小覆盖数)、最大独立数、最小路径覆盖、带权最优匹配
- Ubuntu下为Firefox安装Adobe Flash Player
- 各种linux系统开启关闭防火墙的命令
- 黑马程序员_String
- poj 1155 TELE (树形DP+优化)
- 解决error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No su
- 可惜我是水瓶座 (文/猫猫)
- 黑马程序员_java基础加强之枚举
- 黑马程序员---java学习笔记之交通灯
- (1)搭建opencv-android环境
- [SQLite]www.sqlite.org官网.NET最新版本所有内容下载
- Linux core dumps 的调试 .
- 无向图最小割算法。
- wm_keydown 和vm_char 区别以及 mfc DiapatchMessage派送消息返回之前的过程解析