The requested PHP extension ext-redis * is missing from your system. Install or enable PHP's redis e

马欣荣
2023-12-01

The requested PHP extension ext-redis * is missing from your system. Install or enable PHP’s redis extension.
今天使用composer 安装swoft 错误信息:系统中缺少请求的php扩展ext redis*。安装或启用php的redis扩展。
结果是因为PHP中没有安装redis扩展
[root@VM_0_5_centos src]# wget http://pecl.php.net/get/redis-4.2.0.tgz
[root@VM_0_5_centos src]# tar -xzvf redis-4.2.0.tgz
[root@VM_0_5_centos src]# cd redis-4.2.0/
[root@VM_0_5_centos redis-4.2.0]# phpize
[root@VM_0_5_centos redis-4.2.0]# ./configure --with-php-config=/usr/local/php/bin/php-config
[root@VM_0_5_centos redis-4.2.0]# make && make install
然后去php.ini里面增加extension=redis.so就好了(记得重启服务)
接下来就可以安装swoft了
[root@VM_0_5_centos wwwroot]# composer create-project swoft/swoft swoft

 类似资料: