安裝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.
根據(jù)提示時php 缺少redis擴(kuò)展厅克。
解決方案:缺啥補(bǔ)啥。
1)下載擴(kuò)展包:http://pecl.php.net/package/redis
2)執(zhí)行如下操作所计,編譯安裝擴(kuò)展包
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
添加擴(kuò)展配置:
extension=/usr/local/Cellar/php@7.2/7.2.15/pecl/20170718/redis.so
保存配置文件后蔓纠,查看PHP擴(kuò)展是否正確安裝
php -m