问题描述
我从我的 laravel 项目在终端中启动命令:
composer require laravel/breeze --dev
但这是我的错误:
[invalidargumentexception]
Package laravel/breeze has a PHP requirement incompatible with your PHP version,PHP extensions and Composer version
如果我输入 PHP -v
:
PHP 7.1.33 (cli) (built: Jan 18 2020 13:49:07) ( NTS )
然后 brew upgrade PHP
我有错误 Error: PHP not installed
。
所以我做brew install PHP
。
回复是:
Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.
Error: PHP: no bottle available!
解决方法
尝试通过 brew 安装 php7.3。您当前的版本可能是由 macOS 安装的。
brew install [email protected]
别忘了导出新路径
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"'