由于系统PHP版本导致安装Laravel/Spark时出现问题



我在一台新的开发机器上,我在安装Laravel, Spark或任何需要PHP 5.5.30更新的东西时遇到问题。

问题是,我使用的MAMP Pro是运行PHP 7.0.1。我还尝试使用本教程将系统的PHP版本更新为PHP 7: https://coolestguidesontheplanet.com/upgrade-php-on-osx/

☁  /webroot  spark 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.30) does not satisfy that requirement.
Problem 2
    - Installation request for laravel/framework v5.3.20 -> satisfiable by laravel/framework[v5.3.20].
    - laravel/framework v5.3.20 requires php >=5.6.4 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 3
    - Installation request for phpunit/php-code-coverage 4.0.1 -> satisfiable by phpunit/php-code-coverage[4.0.1].
    - phpunit/php-code-coverage 4.0.1 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 4
    - Installation request for phpunit/phpunit 5.6.2 -> satisfiable by phpunit/phpunit[5.6.2].
 - phpunit/phpunit 5.6.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 5
    - Installation request for phpunit/phpunit-mock-objects 3.4.0 -> satisfiable by phpunit/phpunit-mock-objects[3.4.0].
    - phpunit/phpunit-mock-objects 3.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 6
    - Installation request for sebastian/code-unit-reverse-lookup 1.0.0 -> satisfiable by sebastian/code-unit-reverse-lookup[1.0.0].
 - sebastian/code-unit-reverse-lookup 1.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 7
    - Installation request for sebastian/object-enumerator 1.0.0 -> satisfiable by sebastian/object-enumerator[1.0.0].
 - sebastian/object-enumerator 1.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 8
    - Installation request for sebastian/resource-operations 1.0.0 -> satisfiable by sebastian/resource-operations[1.0.0].
 - sebastian/resource-operations 1.0.0 requires php >=5.6.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 9
    - Installation request for sebastian/version 2.0.0 -> satisfiable by sebastian/version[2.0.0].
    - sebastian/version 2.0.0 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Application ready! Build something amazing.
Downloading Spark...

我不想通过编辑编辑器文件来绕过所需的PHP版本,因为我不确定它是否会在安装应用程序时引起问题。我的Spark或Laravel安装都不工作,他们只是给出一个500状态错误,这可能是别的东西,但我假设这是同样的问题。

全部修复。感谢kyslik的建议。

我以前尝试过更新我的PATH,但由于某种原因,这次它工作了。我以前一定是弄错了。参考其他人有这个问题,我遵循这个:

如何覆盖PHP的路径来使用MAMP路径?

相关内容

  • 没有找到相关文章

最新更新