我正在尝试使用 Pecl 和 Pear 安装 memcached。当我运行这个命令时
Abrams-MacBook-Air-3:recurly abramhandler$ sudo pecl install memcached --with-libememcached-dir=/usr/lib/libmemcached-1.0.17/libmemcached
我收到以下错误
checking for libmemcached location... configure: error: memcached support requires libmemcached 1.0.x. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/private/tmp/pear/install/memcached/configure' failed
这个目录包含很多头文件,但似乎可能是错误的?
/usr/lib/libmemcached-1.0.17/libmemcached
memcached 正在寻找哪些标头?我应该在安装命令中包含哪个目录?
pecl 不允许在编译扩展时传递配置参数。
您也必须自己解压存档并自行安装。说明可以在 http://cweiske.de/tagebuch/phpfarm-install-extensions.htm
找到您可以传递如下配置选项:
pecl install -D 'with-php-config="/usr/local/bin/php-config" with-libmemcached-dir="/usr" with-zlib-dir="no" enable-memcached-msgpack="no" enable-memcached-json="no" with-system-fastlz="no" enable-memcached-igbinary="yes" enable-memcached-protocol="yes" enable-memcached-sasl="yes" enable-memcached-session="yes"' memcached