使用./configure --with--php-config=/usr/local/php8/bin/php-config
报错
checking whether to build shared libraries... yes
checking whether to build static libraries... nocreating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
configure: WARNING: unrecognized options: --with--php-config
改用
./configure --enable-redis=/usr/local/php8/bin/php-config
原因:
我的是PHP8.1 版本,需要使用适合的redis 扩展
https://github.com/phpredis/phpredis/releases
下载最新版本phpredis-5.3.7
cd phpredis-5.3.7
phpize
./configure --with-php-config=/usr/local/php8/bin/php-config
make && make install
修改php.ini 文件
添加扩展extension=redis

发表评论 取消回复