安装swoft2.0.1报错如下:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-redis * is missing from your system. Install or enable PHP's redis extension.
根据提示时php 缺少redis扩展。
解决方案:缺啥补啥。
1)下载扩展包:http://pecl.php.net/package/redis
2)执行如下操作,编译安装扩展包
tar -xzvf redis-4.3.0.tar
cd redis-4.3.0
/usr/local/opt/php@7.2/bin/phpize
./configure --with-php-config=/usr/local/opt/php\@7.*/bin/php-config
make
make install
vim /usr/local/etc/php/7.2/php.ini
添加扩展配置:
extension=/usr/local/Cellar/php@7.2/7.2.15/pecl/20170718/redis.so
保存配置文件后,查看PHP扩展是否正确安装
php -m