Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1800699
  • 博文数量: 306
  • 博客积分: 3133
  • 博客等级: 中校
  • 技术积分: 3932
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-19 16:50
文章分类

全部博文(306)

文章存档

2018年(7)

2017年(18)

2016年(39)

2015年(35)

2014年(52)

2013年(39)

2012年(22)

2011年(29)

2010年(53)

2009年(12)

分类: LINUX

2009-07-07 16:47:56

./event-test: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory

原因是找不到libevent-1.4.so.2类库,解决办法如下:

$:LD_DEBUG=libs ./memcached -v 2>&1 > /dev/null | less

 2262:      search path=/lib/tls/i686/sse2:/lib/tls/i686:/lib/tls/sse2:/lib/tls:/lib/i686/sse2:/lib/i686:/lib/sse2:/lib:/usr/lib/tls/i686/sse2:/usr/lib/tls/i686:/usr/lib/tls/sse2:/usr/lib/tls:/usr/lib/i686/sse2:/usr/lib/i686:/usr/lib/sse2:/usr/lib            (system search path)
      2262:       trying file=/lib/tls/i686/sse2/libevent-1.4.so.2
      2262:       trying file=/lib/tls/i686/libevent-1.4.so.2
      2262:       trying file=/lib/tls/sse2/libevent-1.4.so.2
      2262:       trying file=/lib/tls/libevent-1.4.so.2
      2262:       trying file=/lib/i686/sse2/libevent-1.4.so.2
      2262:       trying file=/lib/i686/libevent-1.4.so.2
      2262:       trying file=/lib/sse2/libevent-1.4.so.2
      2262:       trying file=/lib/libevent-1.4.so.2
      2262:       trying file=/usr/lib/tls/i686/sse2/libevent-1.4.so.2
      2262:       trying file=/usr/lib/tls/i686/libevent-1.4.so.2
      2262:       trying file=/usr/lib/tls/sse2/libevent-1.4.so.2
      2262:       trying file=/usr/lib/tls/libevent-1.4.so.2
      2262:       trying file=/usr/lib/i686/sse2/libevent-1.4.so.2
      2262:       trying file=/usr/lib/i686/libevent-1.4.so.2
      2262:       trying file=/usr/lib/sse2/libevent-1.4.so.2
      2262:       trying file=/usr/lib/libevent-1.4.so.2
      2262:    
./event-test: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory

例子程序会到很多地方去找,所以根据其它求,我们只需建一个软链接,指定到我们安装的类库上即可
方法如下:
ln -s /usr/local/lib/libevent-1.4.so.2 /lib/libevent-1.4.so.2

OK
阅读(3215) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-07-13 18:38:36

ln -s /usr/local/lib/libevent-1.4.so.2 /lib/libevent-1.4.so.2