安装完libevent后应该做的事情 (error while loading shared libraries: libevent-2.xxxx ......)

今天在新开的Ubuntu虚拟机上安装libevent,本来感觉没啥需要特别注意的,因为他自带的README.md 文件就已经说清楚了如何安装"安装说明",无非就是简单的几步:

$ ./configure
$ make
$ make verify   # (optional)
$ sudo make install

但是按照这个安装完后,写了一个测试程序去运行,发现他提示这类错误

error while loading shared libraries: libevent-2.xxxx ......

然后我注意到一个细节,就是我make install 成功后,libevent给出的说明信息:

Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值