doq1969 2014-08-26 11:16
浏览 207
已采纳

composer安装要求错误,并且无法做作曲家更新

I'm trying to install KnpMenuBundle here's my current composer.json:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/", "SymfonyStandard": "app/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.5.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~3.0",
        "sensio/framework-extra-bundle": "~3.0",
        "incenteev/composer-parameter-handler": "~2.0",
        "doctrine/migrations": "dev-master",
        "doctrine/doctrine-migrations-bundle": "dev-master",
        "friendsofsymfony/user-bundle": "~2.0@dev",
        "thrace/form-bundle": "dev-master",
        "knplabs/knp-menu-bundle": "dev-master",
        "thrace-project/media-bundle": "dev-master",
        "knplabs/gaufrette": "dev-master",
        "knplabs/knp-gaufrette-bundle": "dev-master",
        "imagine/imagine": "0.5.*"
    },
    "require-dev": {
        "sensio/generator-bundle": "~2.3"
    },
    "scripts": {
        "post-root-package-install": [
            "SymfonyStandard\\Composer::hookRootPackageInstall"
        ],
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.5-dev"
        }
    }
}

When I try composer install, It gives me this error:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for symfony/framework-standard-edition 2.5.x-dev -> satisfiable by symfony/framework-standard-edition[2.5.x-dev].
    - symfony/framework-standard-edition 2.5.x-dev requires knplabs/knp-menu-bundle dev-master -> no matching package found.

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.

I also can't do composer update since it will update my composer.lock and I don't want this to happen. Because I've specified some exact versions to use of ThraceMediaBundle and bundles that it depends on.

So i'm stuck with composer install which gives me the above error.

Any help would be appreciated.


EDIT

When I try:

composer update knplabs/knp-menu-bundle:dev-master --dry-run

I get this output (I mysteriously removes LiipImagineBundle!)

Package "knplabs/knp-menu-bundle:dev-master" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Uninstalling liip/imagine-bundle (dev-master 4415054)

  - Installing knplabs/knp-menu (v2.0.1)

  - Installing knplabs/knp-menu-bundle (dev-master bdfc95d)

knplabs/knp-menu suggests installing pimple/pimple (for the built-in implementations of the menu provider and renderer provider)
knplabs/knp-menu suggests installing silex/silex (for the integration with your silex application)

EDIT 2

My bad, I forgot to add LiipImaginBundle inside composer.json.

  • 写回答

1条回答 默认 最新

  • dongxie548548 2014-08-26 12:29
    关注

    You can do a partial update using composer update <vendor>/<package>.

    Also, liip/imagine-bundle was autoremoved due to not being required in your composer.json.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集