Laravel:您的需求无法解析为一组可安装的软件包


Laravel : Your requirements could not be resolved to an installable set of packages

我正在尝试安装Laravel在本地系统,我得到错误。

操作系统:ubuntu 12.04 LTS

Webserver: Nginx

PHP: PHP 5.3.10

步骤1:

$ git clone https://github.com/laravel/laravel.git my_project

step2:

my_project$ composer install

我得到以下错误。

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.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].
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.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

打开编写器。并将框架版本更改为:

"laravel/framework": "4.0.*"
不是

"laravel/framework": "4.2.*"

也可以通过将php升级到5.4版本来解决这个问题。*或5.5。*:)

对于那些刚开始使用Laravel的人。我通过升级PHP解决了上面的问题。Laravel需要PHP>= 5.4 http://laravel.com/docs/4.2/installation#server-requirements