我是第一次使用Composer,正在尝试通过composer update安装以下库:
https://github.com/neitanod/forceutf8
因此,据我理解,我的composer.json看起来像这样
{
"config": {
"vendor-dir": "libs/vendor"
},
"require": {
"raven/raven": "0.7.1",
"monolog/monolog": "1.7.*",
"smarty/smarty": "3.1.16",
"forceutf8/forceutf8": "master"
}
}
但出于某种原因(我认为是forceutf8没有版本),它会因错误而停止,所有其他内容都已正确安装,我收到的错误信息是:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package forceutf8/forceutf8 could not be found in any version, there may be a typo in the package na
me.
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.
我也尝试了下面的版本,但仍然没有成功。
{
"config": {
"vendor-dir": "libs/vendor"
},
"name": "career/skillquest",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/neitanod/forceutf8"
}
],
"require":
{
"forceutf8/forceutf8": "dev-master",
"raven/raven": "0.7.1",
"monolog/monolog": "1.7.*",
"smarty/smarty": "3.1.16"
}
}
问题在于它需要这样做
"neitanod/forceutf8": "dev-master"
不是
"forceutf8/forceutf8": "master"