Nic*_*ios 1 php macos pear memcached pecl
最近,我一直尝试在已安装的pecl memcacheOSX Catalina 上安装 PHP 扩展brew memcached,每次尝试安装过程时都会收到以下错误:
configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
Run Code Online (Sandbox Code Playgroud)
我已经尝试过 withpecl install memcache和 withpecl install --configureoptions='with-zlib-dir="path"' memcache但没有成功。它总是得到相同的点并且失败。

从我对有关软件包安装的不同主题的回顾来看,问题似乎与命令-D中的选项有关pecl install,因为当我从源代码进行手动安装时,将参数传递--with-zlib-dir=/usr/local/Cellar/zlib/1.2.11给./configure命令,它就像一个魅力一样工作并安装该软件包但现在未在pecl list已安装的软件包中列出,因此无法卸载。
问题是我需要pecl管理包的安装,以便能够在环境从要保护的项目发生变化时随时卸载它。
对此的快速修复(通过https://bugs.php.net/bug.php?id=56522找到)是使用 PHP_ZLIB_DIR 变量而不是 --with-zlib-dir。
IEPHP_ZLIB_DIR=/usr/local/Cellar/zlib/1.2.11 pecl install memcache
我以前也曾在 -D 选项上遇到过困难 - 几乎我可以说它已经完全损坏了。
| 归档时间: |
|
| 查看次数: |
467 次 |
| 最近记录: |