内容目录
执行命令composer require duncan3dc/blade
报如下错误:
Using version ^4.11 for duncan3dc/blade
./composer.json has been updated
Running composer update duncan3dc/blade
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- illuminate/contracts[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] require psr/container ^1.0 -> found psr/container[1.0.0, ..., 1.x-dev] but the package is fixed to 2.0.2 (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.
- duncan3dc/blade 4.11.0 requires illuminate/contracts ^6.0 || ^7.0 -> satisfiable by illuminate/contracts[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev].
- Root composer.json requires duncan3dc/blade ^4.11 -> satisfiable by duncan3dc/blade[4.11.0].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require duncan3dc/blade:*" to figure out if any version is installable, or "composer require duncan3dc/blade:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
原因是:缺少依赖安装包
解决方法:
- 先执行命令
composer require psr/container ^1.0
安装psr/container依赖包 再执行安装命令
composer require duncan3dc/blade
bash-5.0# composer require psr/container ^1.0 ./composer.json has been updated Running composer update psr/container Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 1 update, 0 removals - Downgrading psr/container (2.0.2 => 1.1.2) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 1 update, 0 removals - Downloading psr/container (1.1.2) - Downgrading psr/container (2.0.2 => 1.1.2): Extracting archive Generating optimized autoload files > rm -rf runtime/container 65 packages you are using are looking for funding. Use the `composer fund` command to find out more!
bash-5.0# composer require duncan3dc/blade Using version ^4.11 for duncan3dc/blade ./composer.json has been updated Running composer update duncan3dc/blade Loading composer repositories with package information Updating dependencies Lock file operations: 8 installs, 0 updates, 0 removals - Locking duncan3dc/blade (4.11.0) - Locking illuminate/container (v7.30.6) - Locking illuminate/contracts (v7.30.6) - Locking illuminate/events (v7.30.6) - Locking illuminate/filesystem (v7.30.6) - Locking illuminate/support (v7.30.6) - Locking illuminate/view (v7.30.6) - Locking voku/portable-ascii (1.6.1) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 8 installs, 0 updates, 0 removals - Downloading voku/portable-ascii (1.6.1) - Downloading illuminate/contracts (v7.30.6) - Downloading illuminate/support (v7.30.6) - Downloading illuminate/filesystem (v7.30.6) - Downloading illuminate/container (v7.30.6) - Downloading illuminate/events (v7.30.6) - Downloading illuminate/view (v7.30.6) - Downloading duncan3dc/blade (4.11.0) - Installing voku/portable-ascii (1.6.1): Extracting archive - Installing illuminate/contracts (v7.30.6): Extracting archive - Installing illuminate/support (v7.30.6): Extracting archive - Installing illuminate/filesystem (v7.30.6): Extracting archive - Installing illuminate/container (v7.30.6): Extracting archive - Installing illuminate/events (v7.30.6): Extracting archive - Installing illuminate/view (v7.30.6): Extracting archive - Installing duncan3dc/blade (4.11.0): Extracting archive 11 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating optimized autoload files > rm -rf runtime/container 66 packages you are using are looking for funding. Use the `composer fund` command to find out more!
0 条评论
撰写评论