执行 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. codeforces 600E E. Lomsat gelral (线段树合并)

    codeforces 600E E. Lomsat gelral 传送门:https://codeforces.com/contest/600/problem/E 题意: 给你一颗n个节点的树,树上的 ...

  2. gradle 打包后第三方登录不上

    使用 gradlew clean assembleReleaseChannels 生成不用的渠道包后 第三方登录不上 原因:打包未设置好APP的 .keystore

  3. Java 8 访问接口的默认方法

    Java 8 API提供了很多全新的函数式接口来让工作更加方便,有一些接口是来自Google Guava库里的,即便你对这些很熟悉了,还是有必要看看这些是如何扩展到lambda上使用的. 一.Opti ...

  4. 【他山之石】mybatis打印sql日志 相关配置

    背景:mybatis的sql日志打印对我来说一直比较迷,哪怕看过网上很多博客后还是这样,这两天刚好又遇到了问题,要查sql不得已又来查阅,这次终于搞定了. mybatis是有提供日志功能支持的,目前支 ...

  5. Ssh_key免秘钥登录

    一,环境准备 1.1 操作系统 [root@manager ~]# cat /etc/redhat-release CentOS release 6.7 (Final) [root@manager ~ ...

  6. 20191031-4 beta week 1/2 Scrum立会报告+燃尽图 02

    此作业要求参见 https://edu.cnblogs.com/campus/nenu/2019fall/homework/9912 git地址:https://e.coding.net/Eustia ...

  7. 20191017-6 alpha week 2/2 Scrum立会报告+燃尽图 05

    此作业要求参见https://edu.cnblogs.com/campus/nenu/2019fall/homework/9802 小组名称:“组长”组 组长:杨天宇 组员:魏新,罗杨美慧,王歆瑶,徐 ...

  8. 记一次 爬取LOL全皮肤原画保存到本地的实例

    #爬取lol全英雄皮肤 import re import traceback # 异常跟踪 import requests from bs4 import BeautifulSoup #获取html ...

  9. Jmeter-Ant 生成测试报告配置步骤

    1.配置java环境变量(不会的可以自行百度) 2.安装jmeter 3.安装ant,配置ant环境变量 4.将JMeter所在目录下extras子目录里的ant-JMeter-1.1.1.jar复制 ...

  10. 1057 数零壹 (20 分)C语言

    给定一串长度不超过 10^​5的字符串,本题要求你将其中所有英文字母的序号(字母 a-z 对应序号 1-26,不分大小写)相加,得到整数 N,然后再分析一下 N 的二进制表示中有多少 0.多少 1.例 ...