使用./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

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部