使用./configure --with--php-config=/usr/local/php8/bin/php-config
报错
checking whether to build shared libraries... yeschecking whether to build static libraries... nocreating libtoolappending configuration tag "CXX" to libtoolconfigure: patching config.h.inconfigure: creating ./config.statusconfig.status: creating config.hconfigure: 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.7phpize ./configure --with-php-config=/usr/local/php8/bin/php-configmake && make install修改php.ini 文件添加扩展extension=redis
来源地址:https://blog.csdn.net/lxw1844912514/article/details/129498365