2017-08-07 65 views
0

我試圖創建一個新的laravel的應用程序,但是當我使用命令「laravel新的」我有一個錯誤:Laravel新並不在我的本地環境中工作

laravel new 
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 
    - Installation request for phpunit/php-token-stream 2.0.0 -> satisfiable by phpunit/php-token-stream[2.0.0]. 
    - phpunit/php-token-stream 2.0.0 requires php ^7.0 -> your PHP version (5.6.30) does not satisfy that requirement. Problem 2 
    - phpunit/php-token-stream 2.0.0 requires php ^7.0 -> your PHP version (5.6.30) does not satisfy that requirement. 
    - phpunit/php-code-coverage 4.0.8 requires phpunit/php-token-stream ^1.4.2 || ^2.0 -> satisfiable by phpunit/php-token-stream[2.0.0]. 
    - Installation request for phpunit/php-code-coverage 4.0.8 -> satisfiable by phpunit/php-code-coverage[4.0.8]. 

Application ready! Build something amazing. 

我在Windows 10上安裝了php 5.6.30。

我已經嘗試更新作曲家本身和laravel的安裝程序(通過作曲家全局需求「laravel/installer」),但它仍然無法正常工作。

我上次在這臺電腦上試過的時間是三個星期前,然後它就工作了。

編輯:我無法更改我的PHP版本,因爲它是我在我的服務器上使用的版本。

+0

,你需要PHP 7.0或更高 – Jerodev

+0

像@Jerodev說,包中的一個需要PHP的錯誤狀態或7.0更高 – DestinatioN

+0

我認爲你應該更新你的PHP到7.0版本 – Abdessamad139

回答

2

它看起來像你正試圖下載laravel的最新發布。雖然是5.4,但出於某種原因,它是下載laravel的版本是隻與PHP7composer create-project --prefer-dist laravel/laravel blog "5.4.*"嘗試安裝laravel 5.4

+0

感謝您的回答!它也沒有告訴版本號。 –

0

這只是PHPUnit的版本兼容。版本更改爲更小的,如:

"phpunit/phpunit": "~5.7"

"phpunit/phpunit": "~5.0"

相關問題