Centos宝塔面板安装memcached失败的解决办法 缺少sasl 依赖 解决元数据问题

今天分享下wordpress安装memcached失败的解决方案。

昨天折腾一天没有找到办法。后来到论坛去问,运维人员给的回复是服务器上缺少sasl依赖。

失败的执行日志是这样的。

1

100

/bin/install -c -m 644 libmemcached-1.0/alloc.h libmemcached-1.0/allocators.h libmemcached-1.0/analyze.h libmemcached-1.0/auto.h libmemcached-1.0/basic_string.h libmemcached-1.0/behavior.h libmemcached-1.0/callback.h libmemcached-1.0/callbacks.h libmemcached-1.0/configure.h libmemcached-1.0/defaults.h libmemcached-1.0/delete.h libmemcached-1.0/deprecated_types.h libmemcached-1.0/dump.h libmemcached-1.0/encoding_key.h libmemcached-1.0/error.h libmemcached-1.0/exception.hpp libmemcached-1.0/exist.h libmemcached-1.0/fetch.h libmemcached-1.0/flush.h libmemcached-1.0/flush_buffers.h libmemcached-1.0/get.h libmemcached-1.0/hash.h libmemcached-1.0/limits.h libmemcached-1.0/memcached.h libmemcached-1.0/memcached.hpp libmemcached-1.0/options.h libmemcached-1.0/parse.h libmemcached-1.0/platform.h libmemcached-1.0/quit.h libmemcached-1.0/result.h libmemcached-1.0/return.h libmemcached-1.0/sasl.h libmemcached-1.0/server.h libmemcached-1.0/server_list.h libmemcached-1.0/stats.h libmemcached-1.0/storage.h libmemcached-1.0/strerror.h libmemcached-1.0/touch.h libmemcached-1.0/triggers.h libmemcached-1.0/types.h ‘/usr/local/libmemcached/include/libmemcached-1.0’
/bin/mkdir -p ‘/usr/local/libmemcached/include/libmemcachedutil-1.0’
/bin/install -c -m 644 libmemcachedutil-1.0/flush.h libmemcachedutil-1.0/ostream.hpp libmemcachedutil-1.0/pid.h libmemcachedutil-1.0/ping.h libmemcachedutil-1.0/pool.h libmemcachedutil-1.0/util.h libmemcachedutil-1.0/version.h ‘/usr/local/libmemcached/include/libmemcachedutil-1.0’
/bin/mkdir -p ‘/usr/local/libmemcached/include/libmemcached-1.0/types’
/bin/install -c -m 644 libmemcached-1.0/types/behavior.h libmemcached-1.0/types/callback.h libmemcached-1.0/types/connection.h libmemcached-1.0/types/hash.h libmemcached-1.0/types/return.h libmemcached-1.0/types/server_distribution.h ‘/usr/local/libmemcached/include/libmemcached-1.0/types’
/bin/mkdir -p ‘/usr/local/libmemcached/include/libhashkit’
/bin/install -c -m 644 libhashkit/hashkit.h ‘/usr/local/libmemcached/include/libhashkit’
/bin/mkdir -p ‘/usr/local/libmemcached/include/libmemcached-1.0’
/bin/install -c -m 644 libmemcached-1.0/verbosity.h libmemcached-1.0/version.h libmemcached-1.0/visibility.h ‘/usr/local/libmemcached/include/libmemcached-1.0’
/bin/mkdir -p ‘/usr/local/libmemcached/include/libmemcached-1.0/struct’
/bin/install -c -m 644 libmemcached-1.0/struct/allocator.h libmemcached-1.0/struct/analysis.h libmemcached-1.0/struct/callback.h libmemcached-1.0/struct/memcached.h libmemcached-1.0/struct/result.h libmemcached-1.0/struct/sasl.h libmemcached-1.0/struct/server.h libmemcached-1.0/struct/stat.h libmemcached-1.0/struct/string.h ‘/usr/local/libmemcached/include/libmemcached-1.0/struct’
/bin/mkdir -p ‘/usr/local/libmemcached/include/libhashkit-1.0’
/bin/install -c -m 644 libhashkit-1.0/algorithm.h libhashkit-1.0/behavior.h libhashkit-1.0/configure.h libhashkit-1.0/digest.h libhashkit-1.0/function.h libhashkit-1.0/has.h libhashkit-1.0/hashkit.h libhashkit-1.0/hashkit.hpp libhashkit-1.0/strerror.h libhashkit-1.0/string.h libhashkit-1.0/str_algorithm.h libhashkit-1.0/types.h libhashkit-1.0/visibility.h ‘/usr/local/libmemcached/include/libhashkit-1.0’
/bin/mkdir -p ‘/usr/local/libmemcached/include/libmemcached’
/bin/install -c -m 644 libmemcached/memcached.h libmemcached/memcached.hpp libmemcached/util.h ‘/usr/local/libmemcached/include/libmemcached’
/bin/mkdir -p ‘/usr/local/libmemcached/lib/pkgconfig’
/bin/install -c -m 644 support/libmemcached.pc ‘/usr/local/libmemcached/lib/pkgconfig’
make[2]: Leaving directory ‘/root/libmemcached-1.0.18’
make[1]: Leaving directory ‘/root/libmemcached-1.0.18’
–2022-04-03 22:08:01– http://36.133.1.8:5880/src/memcached-2.2.0.tgz
Connecting to 36.133.1.8:5880… connected.
HTTP request sent, awaiting response… 200 OK
Length: 70449 (69K) [application/octet-stream]
Saving to: ‘memcached-2.2.0.tgz’0K ………. ………. ………. ………. ………. 72% 780K 0s
50K ………. …….. 100% 108M=0.06s2022-04-03 22:08:01 (1.05 MB/s) – ‘memcached-2.2.0.tgz’ saved [70449/70449]

Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
configure: WARNING: unrecognized options: –enable-sasl
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for a sed that does not truncate output… /bin/sed
checking for cc… cc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether cc accepts -g… yes
checking for cc option to accept ISO C89… none needed
checking how to run the C preprocessor… cc -E
checking for icc… no
checking for suncc… no
checking whether cc understands -c and -o together… yes
checking for system library directory… lib
checking if compiler supports -R… no
checking if compiler supports -Wl,-rpath,… yes
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for PHP prefix… /www/server/php/56
checking for PHP includes… -I/www/server/php/56/include/php -I/www/server/php/56/include/php/main -I/www/server/php/56/include/php/TSRM -I/www/server/php/56/include/php/Zend -I/www/server/php/56/include/php/ext -I/www/server/php/56/include/php/ext/date/lib
checking for PHP extension directory… /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix… /www/server/php/56/include/php
checking if debug is enabled… no
checking if zts is enabled… no
checking for re2c… no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk… gawk
checking whether to enable memcached support… yes, shared
checking for libmemcached… yes, shared
checking whether to enable memcached session handler support… yes
checking whether to enable memcached igbinary serializer support… no
checking whether to enable memcached json serializer support… no
checking whether to enable memcached msgpack serializer support… no
checking whether to enable memcached sasl support… yes
checking whether to enable memcached protocol support… no
checking for ZLIB… yes, shared
checking for pkg-config… /bin/pkg-config
checking for zlib location… /usr
checking for session includes… /www/server/php/56/include/php
checking for memcached session support… enabled
checking for memcached igbinary support… disabled
checking for memcached msgpack support… disabled
checking for libmemcached location… found version 1.0.18, under /usr/local/libmemcached
checking whether to enable sasl support… yes
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking sasl/sasl.h usability… no
checking sasl/sasl.h presence… no
checking for sasl/sasl.h… no
configure: error: no, sasl.h is not available. Run configure with –disable-memcached-sasl to disable this check
make: *** No targets specified and no makefile found. Stop.
Install failed
|-Successify — 命令已执行! —

按照官方的指导,我试着执行下面的代码,我是centos所以是这样。

1
yum -y install cyrus-sasl cyrus-sasl-devel cyrus-sasl-lib

debian是下面的代码

1
2
apt-get update
apt-get install cyrus-sasl2-doc

又遇到新闻。

这个问题是核心问题。

1
2
3
yum -y install cyrus-sasl cyrus-sasl-devel cyrus-sasl-lib
Repository epel is listed more than once in the configuration
Error: Cannot find a valid baseurl for repo: appstream

然后我又找问题解决方案,幸好有老师傅已经记录了相关的问题,我参考了这个链接:csdn

为了防止上面的链接失效,我这里,再记一遍。

进入/etc/yum.repos.d目录

1
cd /etc/yum.repos.d

创建备份文件夹back

1
mkdir back

备份旧文件至back文件夹

1
mv CentOS-Linux-* back

下载新的源文件

1
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

建立新元数据缓存

1
yum makecache

问题解决完毕 !

重新执行

1
yum -y install cyrus-sasl cyrus-sasl-devel cyrus-sasl-lib

问题解决!
Centos宝塔面板安装memcached失败的解决办法 缺少sasl 依赖 解决元数据问题

重新在宝塔面板执行扩展的安装。

Centos宝塔面板安装memcached失败的解决办法 缺少sasl 依赖 解决元数据问题

安装memcached成功。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索