执行 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. dotnet core 集成到 Mattermost 聊天工具

    在找了很久的团队交流工具,发现了 Mattermost 最好用,但是还需要做一些定制化的功能,于是就找到了 Mattermost 插件开发,还找到了如何自己写服务集成到 Mattermost 里面 本 ...

  2. 【GYM101409】2010-2011 ACM-ICPC, NEERC, Western Subregional Contest

    A-Area and Circumference 题目大意:在平面上给出$N$个三角形,问周长和面积比的最大值. #include <iostream> #include <algo ...

  3. You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

    异常 You are using the runtime-only build of Vue where the template compiler is not available. Either ...

  4. 【Git】git-filter-branch - Rewrite branches

    1.命令使用场景 ①Removing sensitive data from a repository(https://help.github.com/en/github/authenticating ...

  5. Ubuntu常用命令大全 以及 PHP+MySQL代码部署在Linux(Ubuntu)上注意事项

    PHP+MySQL代码部署在Linux(Ubuntu)上注意事项 https://cloud.tencent.com/developer/article/1024187 Ubuntu常用命令大全 ht ...

  6. python类型常用整理

    # 一.数字 # int(..) # 二.字符串 # replace find join strip startswith split upper lower format # tempalte = ...

  7. 《HelloGitHub》第 45 期

    兴趣是最好的老师,HelloGitHub 就是帮你找到兴趣! 简介 分享 GitHub 上有趣.入门级的开源项目. 这是一个面向编程新手.热爱编程.对开源社区感兴趣 人群的月刊,月刊的内容包括:各种编 ...

  8. $ [Contest \#4]$求和 思博题

    正解: 解题报告: 传送门$QwQ$ 一道看起来是数位$dp$其实并不是的题$QwQ$ 首先求$\sum_{l}^r$就变成$\sum_1^r-\sum_1^{l-1}$不说$QwQ$.现在就只要求$ ...

  9. zabbix安装和使用

    前言:zabbix是一款很好用的监控工具,相比nagios(也是监控工具的一种)而言,zabbix提供了强大的视图界面,操作简单,功能强大,只需在页面配置即可,让你用的开心,回家放心. zabbix监 ...

  10. electron-vue 设置cookie

    //设置登录cookie setCookie(name,value){ var Days=30; var exp=new Date(); var date=Math.round(exp.getTime ...