Composer 找不到可满足的包版本
Composer can't find a satisfiable package version
我使用 Toran 作为 packagist 代理和我的主要私有存储库列表。我添加了一个私有组件,托管在 bitbucket 上。下面是组件的composer.json
:
{
"name": "naroga/metronic-bundle",
"authors": [
{
"name": "Pedro Cordeiro",
"email": "<my email>"
}
],
"require": {},
"autoload": {
"psr-0" : {
"Naroga\MetronicBundle" : "src"
}
}
}
我没有在这个 naroga/metronic-bundle
组件中标记任何提交,因为它仍处于开发阶段的早期阶段。然后我在另一个项目中使用以下 composer.json
要求它:
{
"repositories": [
{"type": "composer", "url": "http://<my toran host>/repo/private/"},
{"type": "composer", "url": "http://<my toran host>/repo/packagist/"},
{"packagist": false}
],
"name": "naroga/sample-project",
"type": "project",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
...
"naroga/metronic-bundle": "dev-master"
},
}
我不想降低最低稳定性,因为我需要许多其他应该保持稳定的组件。
当我在我的项目中 运行 一个简单的 composer update -vvv
时,composer 正确地下载了我项目的 composer.json
,如下所示:
Downloading http://<my toran host>/repo/packagist/p/naroga/metronic-bundle.json
但是,最后,它总是抛出这个错误:
Problem 1
- The requested package naroga/metronic-bundle could not be found in any version, there may be a typo in the package name.
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.
我不想添加任何标签,也不想降低项目的minimum-stability
。我该如何继续才能安装此软件包?
composer show naroga/metronic-bundle -vvv
显示以下输出:
C:\Apache24\htdocs\naroga>composer show naroga/metronic-bundle -vvv
Reading ./composer.json
Loading config file C:/Users/pedro.cordeiro/AppData/Roaming/Composer/auth.json
Loading config file ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Executing command (CWD): git rev-list master..outer-blog-view
Failed to initialize global composer: Composer could not find the config file: C:/Users/pedro.cordeiro/AppData/Roaming/Composer/composer.json
To initialize a project, please create a composer.json file as described in the http://getcomposer.org/ "Getting Started" section
Downloading http://<my toran host>/repo/private/packages.json
Writing C:/Users/pedro.cordeiro/AppData/Local/Composer/repo/http---<my toran host>-repo-private/packages.json into cache
Downloading http://<my toran host>/repo/packagist/packages.json
Writing C:/Users/pedro.cordeiro/AppData/Local/Composer/repo/http---<my toran host>-repo-packagist/packages.json into cache
Downloading http://<my toran host>/repo/private/p/naroga/metronic-bundle.json
Writing C:/Users/pedro.cordeiro/AppData/Local/Composer/repo/http---<my toran host>-repo-private/provider-naroga$metronic-bundle.json into cache
Downloading http://<my toran host>/repo/packagist/p/naroga/metronic-bundle.json
Downloading http://<my toran host>/repo/packagist/p/naroga/metronic-bundle.json
name : naroga/metronic-bundle
descrip. :
keywords :
versions : dev-master
type : library
license :
source : [git] https://naroga@bitbucket.org/naroga/metronic-bundle.git c8cc1d66cae1e24b7f4039b690c999a083dd5775
dist : [zip] http://<my toran host>/repo/private/dists/naroga/metronic-bundle/9999999-dev/c8cc1d66cae1e24b7f4039b690c999a083dd5775.zip c8cc1d66cae1e24b7f4039b690c999a083dd5775
names : naroga/metronic-bundle
autoload
psr-0
Naroga\MetronicBundle => src
首先,您可以使用以下方法确定包裹是否可见:
composer show naroga/sample-project
如果它没有列出任何内容,则意味着它根本不存在于您的 Toran 存储库中,这可能表明您在那里配置错误或只是忘记将其添加到 Toran 中。
下一行本身并没有多大意义,它只是意味着作曲家正在 toran 仓库中寻找那个包,但不能保证它存在:Downloading http://<my toran host>/repo/packagist/p/naroga/metronic-bundle.json
事实证明,toran-proxy 不会像处理 packagist 存储库那样以惰性方式处理私有存储库。
因此,在添加新的私有存储库后,运行 php bin/cron
或 php app/console toran:cron
是必须的。
我已经通过这个简单的命令重新同步了存储库 运行,我的包现在可见了。
我使用 Toran 作为 packagist 代理和我的主要私有存储库列表。我添加了一个私有组件,托管在 bitbucket 上。下面是组件的composer.json
:
{
"name": "naroga/metronic-bundle",
"authors": [
{
"name": "Pedro Cordeiro",
"email": "<my email>"
}
],
"require": {},
"autoload": {
"psr-0" : {
"Naroga\MetronicBundle" : "src"
}
}
}
我没有在这个 naroga/metronic-bundle
组件中标记任何提交,因为它仍处于开发阶段的早期阶段。然后我在另一个项目中使用以下 composer.json
要求它:
{
"repositories": [
{"type": "composer", "url": "http://<my toran host>/repo/private/"},
{"type": "composer", "url": "http://<my toran host>/repo/packagist/"},
{"packagist": false}
],
"name": "naroga/sample-project",
"type": "project",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
...
"naroga/metronic-bundle": "dev-master"
},
}
我不想降低最低稳定性,因为我需要许多其他应该保持稳定的组件。
当我在我的项目中 运行 一个简单的 composer update -vvv
时,composer 正确地下载了我项目的 composer.json
,如下所示:
Downloading http://<my toran host>/repo/packagist/p/naroga/metronic-bundle.json
但是,最后,它总是抛出这个错误:
Problem 1
- The requested package naroga/metronic-bundle could not be found in any version, there may be a typo in the package name.
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.
我不想添加任何标签,也不想降低项目的minimum-stability
。我该如何继续才能安装此软件包?
composer show naroga/metronic-bundle -vvv
显示以下输出:
C:\Apache24\htdocs\naroga>composer show naroga/metronic-bundle -vvv
Reading ./composer.json
Loading config file C:/Users/pedro.cordeiro/AppData/Roaming/Composer/auth.json
Loading config file ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Executing command (CWD): git rev-list master..outer-blog-view
Failed to initialize global composer: Composer could not find the config file: C:/Users/pedro.cordeiro/AppData/Roaming/Composer/composer.json
To initialize a project, please create a composer.json file as described in the http://getcomposer.org/ "Getting Started" section
Downloading http://<my toran host>/repo/private/packages.json
Writing C:/Users/pedro.cordeiro/AppData/Local/Composer/repo/http---<my toran host>-repo-private/packages.json into cache
Downloading http://<my toran host>/repo/packagist/packages.json
Writing C:/Users/pedro.cordeiro/AppData/Local/Composer/repo/http---<my toran host>-repo-packagist/packages.json into cache
Downloading http://<my toran host>/repo/private/p/naroga/metronic-bundle.json
Writing C:/Users/pedro.cordeiro/AppData/Local/Composer/repo/http---<my toran host>-repo-private/provider-naroga$metronic-bundle.json into cache
Downloading http://<my toran host>/repo/packagist/p/naroga/metronic-bundle.json
Downloading http://<my toran host>/repo/packagist/p/naroga/metronic-bundle.json
name : naroga/metronic-bundle
descrip. :
keywords :
versions : dev-master
type : library
license :
source : [git] https://naroga@bitbucket.org/naroga/metronic-bundle.git c8cc1d66cae1e24b7f4039b690c999a083dd5775
dist : [zip] http://<my toran host>/repo/private/dists/naroga/metronic-bundle/9999999-dev/c8cc1d66cae1e24b7f4039b690c999a083dd5775.zip c8cc1d66cae1e24b7f4039b690c999a083dd5775
names : naroga/metronic-bundle
autoload
psr-0
Naroga\MetronicBundle => src
首先,您可以使用以下方法确定包裹是否可见:
composer show naroga/sample-project
如果它没有列出任何内容,则意味着它根本不存在于您的 Toran 存储库中,这可能表明您在那里配置错误或只是忘记将其添加到 Toran 中。
下一行本身并没有多大意义,它只是意味着作曲家正在 toran 仓库中寻找那个包,但不能保证它存在:Downloading http://<my toran host>/repo/packagist/p/naroga/metronic-bundle.json
事实证明,toran-proxy 不会像处理 packagist 存储库那样以惰性方式处理私有存储库。
因此,在添加新的私有存储库后,运行 php bin/cron
或 php app/console toran:cron
是必须的。
我已经通过这个简单的命令重新同步了存储库 运行,我的包现在可见了。