centos7 安装php-memcache 扩展报错

php_memcached.c: In function 'zim_Memcached___construct':
php_memcached.c:1284:20: error: lvalue required as left operand of assignment
   GC_REFCOUNT(&le) = 1;

 centos7 安装php-memcache 扩展报错_第1张图片

[root@bogon php-memcached]# make && make install
/bin/sh /usr/local/src/php-memcached/libtool --mode=compile cc -I/usr/local/php73/include/php    -I. -I/usr/local/src/php-memcached -DPHP_ATOM_INC -I/usr/local/src/php-memcached/include -I/usr/local/src/php-memcached/main -I/usr/local/src/php-memcached -I/usr/local/php73/include/php -I/usr/local/php73/include/php/main -I/usr/local/php73/include/php/TSRM -I/usr/local/php73/include/php/Zend -I/usr/local/php73/include/php/ext -I/usr/local/php73/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2 -I/usr/local/php73/include/php -I/usr/local/php73/include/php/main -I/usr/local/php73/include/php/TSRM -I/usr/local/php73/include/php/Zend -I/usr/local/php73/include/php/ext -I/usr/local/php73/include/php/ext/date/lib -I/usr/local/include   -c /usr/local/src/php-memcached/php_memcached.c -o php_memcached.lo 
mkdir .libs
 cc -I/usr/local/php73/include/php -I. -I/usr/local/src/php-memcached -DPHP_ATOM_INC -I/usr/local/src/php-memcached/include -I/usr/local/src/php-memcached/main -I/usr/local/src/php-memcached -I/usr/local/php73/include/php -I/usr/local/php73/include/php/main -I/usr/local/php73/include/php/TSRM -I/usr/local/php73/include/php/Zend -I/usr/local/php73/include/php/ext -I/usr/local/php73/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -I/usr/local/php73/include/php -I/usr/local/php73/include/php/main -I/usr/local/php73/include/php/TSRM -I/usr/local/php73/include/php/Zend -I/usr/local/php73/include/php/ext -I/usr/local/php73/include/php/ext/date/lib -I/usr/local/include -c /usr/local/src/php-memcached/php_memcached.c  -fPIC -DPIC -o .libs/php_memcached.o
/usr/local/src/php-memcached/php_memcached.c: 在函数‘zim_Memcached___construct’中:
/usr/local/src/php-memcached/php_memcached.c:1282:20: 错误:赋值运算的左操作数必须是左值
   GC_REFCOUNT(&le) = 1;
                    ^
make: *** [php_memcached.lo] 错误 1

 安装扩展版本有问题

用下边这个版本解决

PECL :: Package :: memcached 3.1.5

centos7 安装php-memcache 扩展报错_第2张图片

/usr/local/php73/bin/phpize

./configure --with-php-config=/usr/local/php73/bin/php-config

make && make install

centos7 安装php-memcache 扩展报错_第3张图片

参考:PHP 7.3 support · Issue #408 · php-memcached-dev/php-memcached · GitHub

你可能感兴趣的:(php,memcached,开发语言)