Centos7 下安装PHP7 phpredis扩展报错解决办法

hecking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
[root@iZ236oj5mp5Z phpredis-master]# make && make install
/bin/sh /usr/local/src/redis-stable/phpredis-master/libtool --mode=compile cc -I. -I/usr/local/src/redis-stable/phpredis-master -DPHP_ATOM_INC -I/usr/local/src/redis-stable/phpredis-master/include -I/usr/local/src/redis-stable/phpredis-master/main -I/usr/local/src/redis-stable/phpredis-master -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/redis-stable/phpredis-master/redis.c -o redis.lo
mkdir .libs
cc -I. -I/usr/local/src/redis-stable/phpredis-master -DPHP_ATOM_INC -I/usr/local/src/redis-stable/phpredis-master/include -I/usr/local/src/redis-stable/phpredis-master/main -I/usr/local/src/redis-stable/phpredis-master -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/redis-stable/phpredis-master/redis.c -fPIC -DPIC -o .libs/redis.o
In file included from /usr/local/src/redis-stable/phpredis-master/redis.c:27:0:
/usr/local/src/redis-stable/phpredis-master/common.h:3:40: 致命错误:ext/standard/php_smart_str.h:没有那个文件或目录
#include <ext/standard/php_smart_str.h>
^
编译中断。
make: *** [redis.lo] 错误 1

---------2020年5月更新-------------

 这个文章发表的时候是三年前php7刚出来的时候,现在已经不需要切换分支编译了。

       git clone https://github.com/nicolasff/phpredis

/usr/local/php/bin/phpize 

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

make && make install

然后看到了等字样,就说明安装成功了

 

 
相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页