php Laravel:无法将您的要求解析为一组可安装的软件包
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24076133/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel : Your requirements could not be resolved to an installable set of packages
提问by Parnit Das
I am trying to install Laravel in local system and i am getting error.
我正在尝试在本地系统中安装 Laravel,但出现错误。
OS : ubuntu 12.04 LTS
操作系统:ubuntu 12.04 LTS
Webserver : Nginx
网络服务器:Nginx
PHP : PHP 5.3.10
PHP : PHP 5.3.10
step 1 :
第1步 :
$ git clone https://github.com/laravel/laravel.git my_project
step2 :
第2步 :
my_project$ composer install
I am getting following error.
我收到以下错误。
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.
回答by Nanhe Kumar
Open your composer.json file and change framework version to the following:
打开您的 composer.json 文件并将框架版本更改为以下内容:
"laravel/framework": "4.0.*"
instead of
代替
"laravel/framework": "4.2.*"
回答by Hristo Enev
You can also solve this by upgrading your php to version 5.4.* or 5.5.* :)
您也可以通过将 php 升级到 5.4.* 或 5.5.* 版本来解决此问题:)
回答by muya_
Tip for those starting out with Laravel. I solved the problem above by upgrading my PHP. Laravel requires PHP >= 5.4 http://laravel.com/docs/4.2/installation#server-requirements
给那些刚开始使用 Laravel 的人的提示。我通过升级我的 PHP 解决了上述问题。Laravel 需要 PHP >= 5.4 http://laravel.com/docs/4.2/installation#server-requirements