0

我正在尝试安装composer require php-ffmpeg/php-ffmpeg,但出现依赖错误:

  Problem 1
    - Root composer.json requires php-ffmpeg/php-ffmpeg ^0.18.0 -> satisfiable by php-ffmpeg/php-ffmpeg[v0.18.0].
    - php-ffmpeg/php-ffmpeg v0.18.0 requires doctrine/cache ^1.0 -> found doctrine/cache[v1.0, ..., 1.12.1] but the package is fixed to 2.1.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

我不明白学说缓存如何冲突?我试过-W了,但我得到了更多的错误......??

作曲大师能帮忙吗?

我的作曲家.json:

{
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "stable",
    "prefer-stable": true,
    "require": {
        "php": ">=8.1.0",
        "ext-ctype": "*",
        "ext-fileinfo": "*",
        "ext-gd": "*",
        "ext-iconv": "*",
        "ext-imagick": "^3.6",
        "ext-json": "*",
        "ext-openssl": "*",
        "doctrine/doctrine-bundle": "^2.5",
        "doctrine/doctrine-migrations-bundle": "^3.2",
        "doctrine/migrations": "^3.3",
        "doctrine/orm": "^2.10",
        "jms/serializer-bundle": "^4.0",
        "knplabs/knp-paginator-bundle": "^5.8",
        "laminas/laminas-code": "4.5.x-dev as 4.5.0",
        "symfony/asset": "6.0.*",
        "symfony/cache": "6.0.*",
        "symfony/config": "6.0.*",
        "symfony/console": "6.0.*",
        "symfony/dependency-injection": "6.0.*",
        "symfony/dotenv": "6.0.*",
        "symfony/flex": "^2",
        "symfony/framework-bundle": "6.0.*",
        "symfony/mailer": "6.0.*",
        "symfony/mime": "6.0.*",
        "symfony/runtime": "6.0.*",
        "symfony/twig-bundle": "6.0.*",
        "symfony/validator": "6.0.*",
        "symfony/web-profiler-bundle": "6.0.*",
        "symfony/yaml": "6.0.*"
    },
    "require-dev": {
        "symfony/maker-bundle": "^1.36",
        "symfony/var-dumper": "6.0.*"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php73": "*",
        "symfony/polyfill-php74": "*",
        "symfony/polyfill-php80": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "6.0.*"
        }
    }
}
4

1 回答 1

0

看起来有人已经在 repo 中打开了一个 PR 来解决这个问题,但它自 3 月以来一直没有更新。同时,如果您信任使用某个随机用户创建的分叉存储库,则有一种解决方法:

"require": {
  "php-ffmpeg/php-ffmpeg": "dev-psr"
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/ekyna/PHP-FFMpeg.git"
    }
],
于 2021-12-08T20:53:46.420 回答