执行 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

ldd /usr/local/memcached/bin/memcached

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

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

locate libevent-2.1.so.6

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

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

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

ln -s /usr/local/lib/libevent-2.1.so.6 /usr/lib64/libevent-2.1.so.6

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

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

/etc/init.d/memcached restart

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

error while loading shared libraries: libevent-2.1.so.6 的解决办法的更多相关文章

  1. 订阅 memcached: error while loading shared libraries: libevent-2.0.so.5: cannot o解决

    memcached: error while loading shared libraries: libevent-2.0.so.5: cannot o解决   memcached基本选项 -p 端口 ...

  2. Linux从error while loading shared libraries: libxxx.so.x 错误的常规解决思路看程序与动态库的关系

    出现这类错误的原因通常是动态库无法被加载,本文介绍了常规的解决方案,适用多种情况: 创作不易,如果本文帮到了您: 如果本文帮到了您,请帮忙点个赞

  3. Linux中error while loading shared libraries错误解决办法

    默认情况下,编译器只会使用/lib和/usr/lib这两个目录下的库文件,通常通过源码包进行安装时,如果不指定--prefix,会将库安装在/usr/local/lib目录下:当运行程序需要链接动态库 ...

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

    错误信息: /usr/local/memcacheq/bin/memcacheq: error while loading shared libraries: libevent-2.0.so.5: c ...

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

    程序编译成功后,运行时错误: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object fi ...

  6. error while loading shared libraries: libevent-1.x.so.1

    安装完memcache后启动报错(error while loading shared libraries: libevent-1.x.so.1) 这是由于64位linux会去/usr/lib64目录 ...

  7. memcached安装报错 error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory解决

    我是从其他服务器scp来的memcached(~~~整个文件夹的那种,windows用多了的后遗症) 在准备运行 ./memcached -d -u root -l localhost -m 800 ...

  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 ...

  10. error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

    zabbix3.2启动有如下报错: # service zabbix_server startStarting zabbix_server:  /home/zabbix-server/sbin/zab ...

随机推荐

  1. 连接远程mysql(Linux环境)

    保证三点: 1.打开/etc/my.cnf,找到[mysqld]项,在其后加入一句:skip-name-resolve,保存,重启mysql服务. service mysqld restart  或者 ...

  2. Shave Beaver! CodeForces - 331B2 (线段树)

    题面 The Smart Beaver has recently designed and built an innovative nanotechnologic all-purpose beaver ...

  3. rabbitmq template发送的消息中,Date类型字段比当前时间晚了8小时

    前言 前一阵开发过程遇到的问题,用的rabbitmq template发送消息,消息body里的时间是比当前时间少了8小时的,这种一看就是时区问题了. 就说说为什么出现吧. 之前的配置是这样的: @B ...

  4. .net core允许跨域

    // 设置允许所有来源跨域 app.UseCors(options => { options.AllowAnyHeader(); options.AllowAnyMethod(); option ...

  5. java 如何重写equals

    java中重写equals表面上看只涉及equals与hashCode两个方法,但如果仔细考虑发现重写一个逻辑完整的equals并不容易,需要考虑克隆,继承(多态)等问题,下面是最近的几点心得 1.先 ...

  6. Hibernate管理Session

    Hibernate自身提供了三种管理Session对象的方法 Session对象的生命周期与本地线程绑定 Session对象的生命周期与JTA事务绑定 Hibernate委托程序管理Session对象 ...

  7. pytorch代码调试工具

    https://github.com/zasdfgbnm/TorchSnooper pip install torchsnooper 在函数前加装饰器@torchsnooper.snoop()

  8. 曹工杂谈--使用mybatis的同学,进来看看怎么在日志打印完整sql吧,在数据库可执行那种

    前言 今天新年第一天,给大家拜个年,祝大家新的一年里,技术突突突,头发长长长! 咱们搞技术的,比较直接,那就开始吧.我给大家看看我demo工程的效果(代码下边会给大家的): 技术栈是mybatis/m ...

  9. Docker Swarm Mode 入门实践

    本文来源 翻译并总结官方文档,添加自定义示例,参考自Docker 19.03版本官方文档 未来可能归档为:https://docs.docker.com/v19.03/ 2020.01.03为http ...

  10. JVM探秘:垃圾收集算法

    本系列笔记主要基于<深入理解Java虚拟机:JVM高级特性与最佳实践 第2版>,是这本书的读书笔记. 垃圾收集算法 垃圾收集算法主要有标记-清除算法.复制算法.标记-整理算法.分代收集算法 ...