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

时间:2014-10-08 23:32:40

标签: php laravel laravel-4 composer-php

作曲家之类的新手并且遇到了一个问题。

尝试使用以下方式下载所有文件时

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 +

感谢。克雷格。

1 个答案:

答案 0 :(得分:1)

你应该告诉你的mac使用你在Mamp上使用的最新版本的php。你可以在你的.bash_profile中做到这一点。

查看此post了解详情。