程序编译成功后,运行时错误:

error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

解决方法:

像libevent这种开源库,编译安装后,一般在/usr/local/lib目录下,可以通过下列命令查找:

#whereis libevent-2.0.so.5

libevent-2.0.so: /usr/local/lib/libevent-2.0.so.5

如果是自己编写的库,whereis是找不到的,当然自己也是知道该库在哪个地方的。

找到该库后,做一个软连接或者直接将该文件拷贝至相应lib库。

ln -s /usr/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5

或者

cp /usr/local/lib/libevent-2.0.so.5 /usr/lib

error while loading shared libraries: lib******: cannot open shared object file: No such file or directory的更多相关文章

  1. 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

    运行编译后的程序报错  error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...

  2. error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

    动态库的搜索路径搜索的先后顺序是: 1.编译目标代码时指定的动态库搜索路径; 2.环境变量LD_LIBRARY_PATH指定的动态库搜索路径: 比如export LD_LIBRARY_PATH=/us ...

  3. Load-time relocation of shared libraries

    E原文地址:http://eli.thegreenplace.net/2011/08/25/load-time-relocation-of-shared-libraries/ This article ...

  4. Position Independent Code (PIC) in shared libraries on x64

    E原文地址:http://eli.thegreenplace.net/2011/11/11/position-independent-code-pic-in-shared-libraries-on-x ...

  5. sqlplus: error while loading shared libraries: /u01/app/lib/libclntsh.so.11.1

    成功安装了Oracle 11g后,使用sqlplus登录数据库时遇到下面错误: [oracle@DB-Server ~]$ sqlplus / as sysdba   sqlplus: error w ...

  6. 【ERROR】while loading shared libraries: /u01/app/oracle/product/11.2.0/lib/libclntsh.so.11.1: cannot

    问题: [oracle@mydb]$ lsnrctl status lsnrctl: error while loading shared libraries: /u01/app/oracle/pro ...

  7. lsnrctl: error while loading shared libraries: /opt/app/oracle/product/11.2/db_1/lib/libclntsh.so.11

    错误描述: 安装好数据库后,在oralce用户下敲入 查看监听状态命令,返回错误提示 [oracle@centos3 ~]$ lsnrctl statuslsnrctl: error while lo ...

  8. linux使用wkhtmltopdf报错error while loading shared libraries:

    官网提示 linux需要这些动态库.depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender) 在li ...

  9. python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory

    安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...

随机推荐

  1. 《c程序设计语言》读书笔记--闰年和字符输入不用 && ||

    #include <stdio.h> #include <string.h> #define sta 1500 #define Num 1600 int main() { in ...

  2. 将Android Studio工程导入到Eclipse中

    1.前言 studio项目中src/main/java目录里面的代码对应的是eclispe项目中的src目录中的代码. 而studio中src目录里面包括整个项目的所有代码包括资源文件和xml. 2. ...

  3. Mac 切换Windows 使用虚拟机, 不推荐双系统

     为什么使用虚拟机而不是双系统? 1.虚拟机可以随时在两个系统之间进行切换,便于在工作时使用而不影响效率.如果是双系统,在切换到另一个系统时需要关机重启,太过麻烦. 2.虚拟机除了运行Windows之 ...

  4. HDU 4652 Dice(期望)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4652 题意:一个m个面的筛子.两种询问:(1)平均抛多少次后使得最后n次的面完全一样:(2)平均抛多少 ...

  5. ubuntu 搭建Erlang开发环境

    首先,打好库: sudo apt-get install build-essential sudo apt-get install libncurses5-dev sudo apt-get insta ...

  6. 5个缺失的 JavaScript 数字格式化函数

    /** 下面两个函数都能对浮点数进行四舍五入,保留小数点后两位 **/ function CurrencyFormatted(amount) { var i = parseFloat(amount); ...

  7. Eclipse附加项目中的某个jar包的源码

    1.这里以web项目为例,打开项目应用的jar包:如下图 2.在想要引入源码的jar包上右键>属性(Properties)

  8. hadoop1常见配置含义

    参数                            取值                                         备注 fs.default.name NameNode ...

  9. NBUT 1120 Reimu's Teleport (线段树)

    题意: 有n个格子,一开始全部面向top.接下来的每次修改F a b ,如果 a>b则将a~b之间的格子全面置为向右,否则置为向左.对于每个询问Q输出向左.top.右的数量. 思路: 普通线段树 ...

  10. 20160123.CCPP详解体系(0002天)

    程序片段(01):字符.c 内容概要: 转义字符 #define _CRT_SECURE_NO_WARNINGS #include <stdlib.h> #include <stdi ...