我試圖創建一個新的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版本,因爲它是我在我的服務器上使用的版本。
,你需要PHP 7.0或更高 – Jerodev
像@Jerodev說,包中的一個需要PHP的錯誤狀態或7.0更高 – DestinatioN
我認爲你應該更新你的PHP到7.0版本 – Abdessamad139