Laravel:您的要求无法解析为可安装的软件包集

时间:2014-06-06 07:06:13

标签: php laravel-4

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

操作系统:ubuntu 12.04 LTS

网络服务器:Nginx

PHP:PHP 5.3.10

第1步:

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

第二步:

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.

3 个答案:

答案 0 :(得分:9)

打开您的composer.json文件并将框架版本更改为以下内容:

"laravel/framework": "4.0.*"

而不是

"laravel/framework": "4.2.*"

答案 1 :(得分:0)

你也可以通过将你的php升级到版本5.4。*或5.5。*:)

来解决这个问题

答案 2 :(得分:-1)

提示那些从Laravel开始的人。我通过升级我的PHP解决了上面的问题。 Laravel需要PHP&gt; = 5.4 http://laravel.com/docs/4.2/installation#server-requirements