首页 > 其他分享 >error while loading shared libraries: libevent-2.1.so.6 的解决办法

error while loading shared libraries: libevent-2.1.so.6 的解决办法

时间:2023-02-22 10:00:56浏览次数:52  
标签:loading local libevent libraries usr so.6 error 2.1 memcached


执行 memcached 启动命令时,报错,提示:error while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such file or directory

  • 查看 memcached 命令缺失什么库
ldd /usr/local/memcached/bin/memcached

结果: libevent-2.1.so.6 模块找不到

  • 查看 libevent-2.1.so.6 是否存在
locate libevent-2.1.so.6

结果: 系统已经安装了该模块,在路径 /usr/local/lib/

  • 查看 memcached 查找依赖库的路径
LD_DEBUG=libs /usr/local/memcached/bin/memcached -v

结果: 在 /lib64/ 目录中查找,所以找不到已经安装好的

  • 映射 libevent-2.1.so.6 到 /lib64 路径中
ln -s /usr/local/lib/libevent-2.1.so.6 /usr/lib64/libevent-2.1.so.6

结果:这样处理后,memcached就可以搜索到该文件了

  • 启动memcached服务
/etc/init.d/memcached restart

此处会略有不同,因为提前已经安装了memcache开机启动脚本

详细操作如下:

error while loading shared libraries: libevent-2.1.so.6 的解决办法_搜索


标签:loading,local,libevent,libraries,usr,so.6,error,2.1,memcached
From: https://blog.51cto.com/u_13675550/6077987

相关文章