作曲家-所请求的软件包存在,但由于您的约束而被拒绝 [英] Composer - The requested package exists as but these are rejected by your constraint

查看:262
本文介绍了作曲家-所请求的软件包存在,但由于您的约束而被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从composer运行安装程序时,出现此错误:

When I run my install from composer, I have this error :

λ作曲家安装 您正在启用xdebug的情况下运行composer.这对运行时性能有重大影响.请参见 https://getcomposer.org/xdebug 使用软件包信息加载作曲家存储库 更新依赖关系(包括require-dev) 您的要求无法解决为一组可安装的软件包.

λ composer install You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

错误:

问题1 -所请求的软件包antoineb1/smoney_bundle 1.0以antoineb1/smoney_bundle [dev-master]的形式存在,但由于您的约束而被拒绝.

Problem 1 - The requested package antoineb1/smoney_bundle 1.0 exists as antoineb1/smoney_bundle[dev-master] but these are rejected by your constraint.

我的 composer.json

{
    "name": "project",
    "license": "proprietary",
    "type": "project",
    "minimum-stability": "dev",
    "prefer-stable" : true,
    "autoload": {
        "psr-4": {
            "": "src/"
        }
    },
    "config": {
        "preferred-install": "dist"
    },
    "repositories": [
        {
            "url": "bitbucket url",
            "type": "vcs"
        }
    ],
    "require": {
        "php": ">=5.5.9",
        "antoineb1/smoney_bundle": "1.0"
    }
}

推荐答案

版本约束"1.0"内部解释的作为"1.0.0.0-stable"版本.

但是唯一可用的版本是:

But the only version available is:

antoineb1/smoney_bundle [dev-master].

antoineb1/smoney_bundle[dev-master].

因此,您可以根据适合的版本将指定的版本更改为以下任一版本:

So you could change the specified version to either one of the following depending on what version is suitable for you:

  • 1.0.*(作曲家将其视为>=1.0.0.0-dev <1.1.0.0-dev-可能无法正常工作,因为该软件包中显然没有任何版本)
  • dev-master
  • dev-master#<hash>
  • @dev
  • 1.0.* (which is seen by composer as >=1.0.0.0-dev <1.1.0.0-dev -- probably won't work because there obviously aren't any versions in that package)
  • dev-master
  • dev-master#<hash>
  • @dev
  • etc.

请参见 composer模式以供参考.

这篇关于作曲家-所请求的软件包存在,但由于您的约束而被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆