【问题标题】:Can't user Composer to install own git repository不能使用 Composer 安装自己的 git 存储库
【发布时间】:2013-11-08 23:15:21
【问题描述】:

我正在尝试包含我在 github 上使用 Composer 创建的存储库。 在我的 composer.json 我有:

"repositories": [
    ...
    {
        "type": "vcs",
        "url": "https://github.com/unknownfrequency/zendservice_discogs"
    }
], 

"require": {
    "unknownfrequency/zendservice_discogs": "dev-master",
}

当我跑步时 $>composer install -vvv 我得到:

@unknown-2~/workspace/imusic $  composer install -vvv
Downloading composer.json
Loading composer repositories with package information
...
Downloading ..//packages.zendframework/packages.json
Downloading ...api.github/repos/unknownfrequency/zendservice_discogs
Downloading         ...github/repos/unknownfrequency/zendservice_discogs/contents/composer.json?ref=master
Downloading ../api.github/repos/unknownfrequency/zendservice_discogs/commits/master
Downloading ...//api.github/repos/unknownfrequency/zendservice_discogs/tags
Downloading ...//api.github/repos/unknownfrequency/zendservice_discogs/git/refs/heads
Reading composer.json of zendframework/zendservice-discogs (master)
Importing branch master (dev-master)
Downloading https://packagist.org/packages.json
Downloading https://packagist.org/p/provider-            latest$cf8f23c1297b4c86275ae395aed6402ba4f5cc186e587b80f8dd5ecca7d60e3f.json
Installing dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package unknownfrequency/zendservice_discogs 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

我已经尝试解决这个问题好几个小时了。希望有人能帮忙!

【问题讨论】:

    标签: git github composer-php


    【解决方案1】:

    根据您的最低稳定性设置,该软件包没有足够稳定的版本"

    这就是问题所在。您需要一个开发分支,但一般不允许包含开发稳定性。

    "minimum-stability":"dev" 添加到您的composer.json 文件中。

    【讨论】:

      【解决方案2】:

      实际上只是做一个:

      php composer.phar self-update
      

      【讨论】:

        猜你喜欢
        • 2023-03-16
        • 2013-01-07
        • 2018-11-29
        • 2016-10-05
        • 1970-01-01
        • 2015-01-19
        • 2015-03-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多