允许composer安装laravel 4并检测MAMP';s的PHP版本不是系统


Allow composer to install laravel 4 and detect MAMP's PHP version not system

composer等新手,遇到问题。

当尝试使用下载所有文件时

composer create laravel/laravel laravelNew

我看到这个错误:

Installing laravel/laravel (v4.2.0)
- Installing laravel/laravel (v4.2.0)
Loading from cache
Created project in laravelNew
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v4.2.9 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.8 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.7 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.6 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.5 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.4 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.3 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.2 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.11 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.10 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.1 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.0 requires php >=5.4.0 -> no matching package found.
- Installation request for laravel/framework 4.2.* -> satisfiable by laravel/framework[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

我在安装了PHP 5.3的mac上,这在进行PHP-v 时得到了证实

PHP 5.3.26 (cli) (built: Jul  7 2013 18:30:38) 

然而,我使用MAMP在本地运行我的网站。

有没有一种方法可以让作曲家检查MAMP php版本?由于MAMP PHP版本为5.4+

谢谢。克雷格。

您应该告诉mac使用与Mamp一起使用的最新版本的php。您可以在.bash_profile.中执行此操作

查看此帖子了解更多信息。