2016-10-24 87 views
0

幾周後,我回到與Laravel一起工作。我遇到了一些麻煩,所以我用documentation的指示重新安裝了它。Mac OS X上的PHP更新錯誤和Laravel全局安裝

首先,我跑了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

您使用的是什麼操作系統?標題中更新了 – user3158900

+0

- Mac OS X –

回答

0

我正在按照來自PHP文檔的指示,當我打這個牆。我從PHP的Homebrew安裝搜索。根據他們的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