如何在 macOS Catalina 上使用 brew 为 PHP 7.4 安装 memcached 3.1.4?
How to install memcached 3.1.4 for PHP 7.4 with brew on macOS Catalina?
命令pecl install memcached
编译失败:
[…]
ched/1.0.18_2/include -c /private/tmp/pear/temp/memcached/php_memcached.c -fno-common -DPIC -o .libs/php_memcached.o
/private/tmp/pear/temp/memcached/php_memcached.c:3237:7: error: expected ';' after expression
ulong key_index;
^
;
/private/tmp/pear/temp/memcached/php_memcached.c:3237:2: error: use of undeclared identifier 'ulong'
ulong key_index;
^
/private/tmp/pear/temp/memcached/php_memcached.c:3237:8: error: use of undeclared identifier 'key_index'
ulong key_index;
^
/private/tmp/pear/temp/memcached/php_memcached.c:3250:49: error: use of undeclared identifier 'key_index'
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(options), key_index, key, value) {
^
/private/tmp/pear/temp/memcached/php_memcached.c:3255:44: error: use of undeclared identifier 'key_index'
if (!php_memc_set_option(intern, (long) key_index, value)) {
[…]
[…]
sasl_done();
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sasl/sasl.h:727:18: note: 'sasl_done' has been explicitly marked deprecated here
LIBSASL_API void sasl_done(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_11,__IPHONE_NA,__IPHONE_NA);
^
2 warnings and 5 errors generated.
make: *** [php_memcached.lo] Error 1
ERROR: `make' failed
Xcode 是最新的,PHP 7.4 运行 很好,用 PECL 安装的其他软件包运行良好。
Memcached 版本 3.1.5 今天安装成功 运行 pecl install memcached
命令pecl install memcached
编译失败:
[…]
ched/1.0.18_2/include -c /private/tmp/pear/temp/memcached/php_memcached.c -fno-common -DPIC -o .libs/php_memcached.o
/private/tmp/pear/temp/memcached/php_memcached.c:3237:7: error: expected ';' after expression
ulong key_index;
^
;
/private/tmp/pear/temp/memcached/php_memcached.c:3237:2: error: use of undeclared identifier 'ulong'
ulong key_index;
^
/private/tmp/pear/temp/memcached/php_memcached.c:3237:8: error: use of undeclared identifier 'key_index'
ulong key_index;
^
/private/tmp/pear/temp/memcached/php_memcached.c:3250:49: error: use of undeclared identifier 'key_index'
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(options), key_index, key, value) {
^
/private/tmp/pear/temp/memcached/php_memcached.c:3255:44: error: use of undeclared identifier 'key_index'
if (!php_memc_set_option(intern, (long) key_index, value)) {
[…]
[…]
sasl_done();
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sasl/sasl.h:727:18: note: 'sasl_done' has been explicitly marked deprecated here
LIBSASL_API void sasl_done(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_11,__IPHONE_NA,__IPHONE_NA);
^
2 warnings and 5 errors generated.
make: *** [php_memcached.lo] Error 1
ERROR: `make' failed
Xcode 是最新的,PHP 7.4 运行 很好,用 PECL 安装的其他软件包运行良好。
Memcached 版本 3.1.5 今天安装成功 运行 pecl install memcached