几周后我回到Laravel工作了。我遇到了一些麻烦所以我用documentation的指示重新安装了它。
首先,我跑了composer global "require laravel/installer"
。
它将我的目录更改为本地目录:Changed current directory to /Users/Mark/.composer
。
我跑了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以正确设置我的机器。
答案 0 :(得分:0)
当我点击这面墙时,我按照PHP文档中的说明操作。我从Homebrew安装PHP搜索。根据他们的documentation我然后更新:
$ 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