今天分享下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: |
按照官方的指导,我试着执行下面的代码,我是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
|
问题解决!
重新在宝塔面板执行扩展的安装。
安装memcached成功。