几周后我又开始使用Laravel了。我遇到了一些麻烦,所以我重新安装了它与说明文件。
首先,我运行composer global "require laravel/installer"
。它将我的目录更改为本地目录:Changed current directory to /Users/Mark/.composer
。
I ran laravel new app
:
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php >=5.6.4 but your PHP version (5.5.27) does not satisfy that requirement.
我试图运行composer update
,但它也不会运行。PHP只有5.6.2可用,没有5.6.4。我认为这可能是因为bash配置文件,但不确定这是否是它或如何做到这一点。
请让我知道如何全局设置Laravel并更新PHP以正确设置我的机器。
当我遇到这个问题时,我正在遵循PHP文档中的说明。我从自制的PHP安装搜索。根据他们的文档,我更新了它:
$ brew update
$ brew upgrade
Installation
Setup the homebrew/dupes tap which has dependencies we need:
$ brew tap homebrew/dupes
Setup the homebrew/versions tap which has dependencies we need:
$ brew tap homebrew/versions
Then, run the following in your command-line:
$ brew tap homebrew/homebrew-php
$ brew install php70