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

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. JAVA中的内部类使用总结

    1)         内部类的优点是:内部类可以访问外部类的私有成员变量,而不需要new外部类的对象. 2)         内部类又分为:静态内部类.匿名内部类.局部内部类.成员内部类. 3)    ...

  2. Idea 使用maven+tomcat的时候,编译指定的Profile

    To build a artifact with a profile you have to create a Maven Run/Debug configuration as in the foll ...

  3. Hadoop集群(第2期)_机器信息分布表

    1.分布式环境搭建 采用4台安装Linux环境的机器来构建一个小规模的分布式集群. 图1 集群的架构 其中有一台机器是Master节点,即名称节点,另外三台是Slaver节点,即数据节点.这四台机器彼 ...

  4. 【转】PWM占空比和分辨率

    占空比是接通时间与周期之比冲量相等而形状不同的窄脉冲加在具有惯性的环节上时,其效果基本相同占空比:就是输出的PWM中,高电平保持的时间与该PWM的时钟周期的时间之比,如一个PWM的频率是1000Hz, ...

  5. iOS富文本(三)深入使用Text Kit

    在上一篇中介绍了Text Kit的三种基本组件的关系并且简单的实现了怎么使用这三种基本组件,本片将深入的去使用这三种基本组件. NSTextStorage NSTextStorage是NSMutabl ...

  6. android 单词

    inflate: 胀, 膨, 通货膨胀, 膨胀系数

  7. mysql分区(partition)

    1)按范分区(range) partition by range(Year(birthday))( partition p0 values less than 1960, partition p1 v ...

  8. yum 一些命令

    1)列出相关rpm包 yum list mysql* 2)使用指定源 yum --enablerepo=remi install [package] 3)卸载rpm包 yum remove mysql ...

  9. org.hibernate.AnnotationException: No identifier specified for entity: cn.itcast.domain.Counter

    因为我的hibernate映射表没有主键所以报这个错. 解决方案是: 1.创建一个主键 2.hibernate处理无主键的表的映射问题,其实很简单,就是把一条记录看成一个主键,即组合主键<com ...

  10. 简单使用Junit

    不需要配置,导入相应jar,然后在测试的方法上面加入注解@Test 执行的时候选择junit即可.