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

6 篇文章 0 订阅
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

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

 

 
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值