[英]Composer issue: “Your requirements could not be resolved to an installable set of packages”
[英]PHP Composer not installing - Your requirements could not be resolved to an installable set of packages
我刚刚Slim Framework for PHP
设置了Slim Framework for PHP
很难通过composer.json
安装slim / views库。
我的composer.json看起来像这样:
{
"name": "slim/slim",
"type": "library",
"description": "Slim Framework, a PHP micro framework",
"keywords": ["microframework","rest","router"],
"homepage": "http://github.com/codeguy/Slim",
"license": "MIT",
"authors": [
{
"name": "Josh Lockhart",
"email": "info@joshlockhart.com",
"homepage": "http://www.joshlockhart.com/"
}
],
"require": {
"php": ">=5.3.0",
"phing/phing": "2.*"
},
"suggest": {
"ext-mcrypt": "Required for HTTP cookie encryption"
},
"autoload": {
"psr-0": { "Slim": "." }
}
}
当我说composer require slim/views
,我得到了这个错误,我不确定它在说什么:
Problem 1
- slim/views 0.1.0 requires slim/slim >=2.0.0 -> satisfiable by slim/slim[2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.6.0, 2.6.1].
- slim/views 0.1.1 requires slim/slim >=2.4.0 -> satisfiable by slim/slim[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.6.0, 2.6.1].
- slim/views 0.1.2 requires slim/slim >=2.4.0 -> satisfiable by slim/slim[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.6.0, 2.6.1].
- slim/views 0.1.3 requires slim/slim >=2.4.0 -> satisfiable by slim/slim[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.6.0, 2.6.1].
- Can only install one of: slim/slim[2.0.0, 1.0.0].
- Can only install one of: slim/slim[2.1.0, 1.0.0].
- Can only install one of: slim/slim[2.2.0, 1.0.0].
- Can only install one of: slim/slim[2.3.0, 1.0.0].
- Can only install one of: slim/slim[2.3.1, 1.0.0].
- Can only install one of: slim/slim[2.3.2, 1.0.0].
- Can only install one of: slim/slim[2.3.3, 1.0.0].
- Can only install one of: slim/slim[2.3.4, 1.0.0].
- Can only install one of: slim/slim[2.3.5, 1.0.0].
- Can only install one of: slim/slim[2.4.0, 1.0.0].
- Can only install one of: slim/slim[2.4.1, 1.0.0].
- Can only install one of: slim/slim[2.4.2, 1.0.0].
- Can only install one of: slim/slim[2.4.3, 1.0.0].
- Can only install one of: slim/slim[2.5.0, 1.0.0].
- Can only install one of: slim/slim[2.6.0, 1.0.0].
- Can only install one of: slim/slim[2.6.1, 1.0.0].
- Installation request for slim/slim 1.0.0 -> satisfiable by slim/slim[1.0.0].
- Installation request for slim/views 0.1.* -> satisfiable by slim/views[0.1.0, 0.1.1, 0.1.2, 0.1.3].
我拥有的Slim Framework的当前版本是2.6.1
。 我发现的一件事是,如果我在composer.json中指定了"version":"2.6.1"
,则在运行composer require slim/views
之前的name
标签之后, composer require
运行良好并且安装了软件包。 不知道发生了什么事; 有人可以帮我吗?
谢谢!
正如ChrisForrence提到的那样,您的包名称slim/slim
正在与同名库冲突。 将软件包名称更改为其他名称 ,slim将按预期安装。
"name": "sasanka/my-app"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.