error while loading shared xxx.so.1 解决方案
来源:互联网 发布:西部数码域名管理平台 编辑:程序博客网 时间:2024/05/17 22:06
所有的“error while loading shared······”应该都是在运行程序时找不到动态库所造成的,解决方法都一样,下面是一个例子
今天编译libpcap错误提示:error while loading shared libraries: libpcap.so.1: cannot open shared object file: No such file or directory
编译命令:gcc nonblocktest.c -L/usr/lib -lpcap -I/usr/include -o non
操作:代码由C编写,gcc编译通过,以管理员权限运行,出错
在网上搜索,才明白在运行程序加载动态库的时候系统找不到libpcap.so.1该库
解决方案:一
把libpcap的所有库都复制到到当前下,再运行程序(在这里是以libpcap为例,其他的包就需要把相应生成的库复制到当前文件夹即可)
解决方案:二
1. 执行 locate libpcap.so.1 , 查看libpcap.so.1在系统中的路径 , 如显示为 : /usr/lib/libpcap.so.1.1.1
2. 以管理员权限打开编辑 /etc/ld.so.conf 文件, 末尾新一行追加 /usr/lib , /usr/lib 为 libpcap.so.1.1.1 所在目录, 保存退出
3. 以管理员权限执行 ldconfig 命令,
4. 成功
- error while loading shared xxx.so.1 解决方案
- error while loading shared libraries: libpcap.so.1 解决方案
- [mysql]error while loading shared libraries: libaio.so.1: 解决方案
- error while loading shared libraries: xxx.so.x"解决办法
- error while loading shared libraries: xxx.so.x
- error while loading shared libraries: xxx.so.x"错误
- error while loading shared libraries: xxx.so.x"
- error while loading shared libraries: xxx.so.x"
- "error while loading shared libraries: xxx.so.x"
- error while loading shared libraries: xxx.so.x的解决办法
- [error]error while loading shared libraries: libpcre.so.1 解决
- GtkLauncher: error while loading shared libraries: libgbm.so.1: 的一种解决方案
- error while loading shared libraries: XXX.so: cannot open shared object file: No such file...
- 运行错误:error while loading shared libraries: xxx.so.0:cannot open shared object file
- error while loading shared libraries: xxx.so.0:cannot open shared object file:的错误解决
- error while loading shared librarieserror while loading shared libraries: : libz.so.1
- error while loading shared libraries: xxx
- error while loading shared libraries:libselinux.so.1
- static inline 和 extern inline 的含义
- Fedora 14使用iso DVD镜像源yum安装软件
- myeclipse中如何自动生成hibernate得POJO和hbm.xml文件
- POJ 1887
- 虚函数调用汇编
- error while loading shared xxx.so.1 解决方案
- MathML 及数学公式的编辑器 MathJax (论坛回复摘要)
- Linux常用命令大全
- 左右变动-----------移位运算符
- HDU3743(归并排序模板题)Frosh Week
- 关于zend optimizer与zend debugger共存的问题
- 3月20日整理
- spring classpath 加载配置文件
- TCP三次握手/四次挥手详解