>백엔드 개발 >PHP 튜토리얼 >在composer.json中添加了一个git地址;composer update 报错

在composer.json中添加了一个git地址;composer update 报错

WBOY
WBOY원래의
2016-07-06 13:52:272746검색

在composer.json中添加了一个git地址;composer update 报错,不知道是什么原因导致的,如图:

在composer.json中添加了一个git地址;composer update 报错

在composer.json中添加了一个git地址;composer update 报错

问题补充:

<code>在BAE包里面添加composer.json 后 重新composer update

    
    Your requirements could not be resolved to an installable set of packages.

  Problem 1</code>
    • The requested package zcbo/bae 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

      <code>  see <https:> for more details.
      </https:></code>

      Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

      项目的composer.json如下
      {

    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {

    <code>"php": ">=5.5.9",
    "zcbo/bae":"master",
    "laravel/framework": "5.2.*"</code>

    },
    "require-dev": {

    <code>"fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "symfony/css-selector": "2.8.*|3.0.*",
    "symfony/dom-crawler": "2.8.*|3.0.*"</code>

    },

    <code>......
    </code>

    追问:
    已将master 改成 dev-master 报错信息如下:
    另外,怎么使用tag?
    在composer.json中添加了一个git地址;composer update 报错

    回复内容:

    在composer.json中添加了一个git地址;composer update 报错,不知道是什么原因导致的,如图:

    在composer.json中添加了一个git地址;composer update 报错

    在composer.json中添加了一个git地址;composer update 报错

    问题补充:

    <code>在BAE包里面添加composer.json 后 重新composer update
    
        
        Your requirements could not be resolved to an installable set of packages.
    
      Problem 1</code>
    • The requested package zcbo/bae 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

      <code>  see <https:> for more details.
      </https:></code>

      Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

      项目的composer.json如下
      {

    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {

    <code>"php": ">=5.5.9",
    "zcbo/bae":"master",
    "laravel/framework": "5.2.*"</code>

    },
    "require-dev": {

    <code>"fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "symfony/css-selector": "2.8.*|3.0.*",
    "symfony/dom-crawler": "2.8.*|3.0.*"</code>

    },

    <code>......
    </code>

    追问:
    已将master 改成 dev-master 报错信息如下:
    另外,怎么使用tag?
    在composer.json中添加了一个git地址;composer update 报错

    你要确定你的git仓库是一个正确的composer项目,这里已经写明了,你定义的仓库里并没有定义composer所必须的composer.jsoncomposer是不能识别这个仓库的。

    补答:
    master分支默认会被解析成dev-master这个版本号,所以你直接用master做版本号是不行的。另外,最好通过tag明确一个版本并使用。

    성명:
    본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.