提问前请务必仔细阅读 如何排查故障 和 常见问题。
问题描述:
安装flysystem-aws-s3-v3插件报错
FLARUM是docker安装的,版本如下
- Flarum1.7.2
- PHP 8.0.28
- MySQL5.7.42
报错内容:
/flarum/app # composer require league/flysystem-aws-s3-v3
./composer.json has been updated
Running composer update league/flysystem-aws-s3-v3
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- league/flysystem-aws-s3-v3[1.0.26, ..., 1.0.30] require aws/aws-sdk-php ^3.20.0 -> satisfiable by aws/aws-sdk-php[3.20.0, ..., 3.269.13].
- league/flysystem-aws-s3-v3[1.0.1, ..., 1.0.25] require aws/aws-sdk-php ^3.0.0 -> satisfiable by aws/aws-sdk-php[3.0.0, ..., 3.269.13].
- league/flysystem-aws-s3-v3 1.0.0 requires aws/aws-sdk-php 3.*@dev -> satisfiable by aws/aws-sdk-php[3.0.0, ..., 3.269.13].
- aws/aws-sdk-php[3.0.1, ..., 3.3.4] require guzzlehttp/psr7 ~1.0 -> found guzzlehttp/psr7[1.0.0, ..., 1.9.1] but the package is fixed to 2.5.0 (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.
- aws/aws-sdk-php[3.0.0, ..., 3.18.28] require guzzlehttp/guzzle ~5.3|~6.0.1|~6.1 -> found guzzlehttp/guzzle[5.3.0, ..., 5.3.4, 6.0.1, ..., 6.5.8] but the package is fixed to 7.5.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.
- aws/aws-sdk-php 3.18.29 requires guzzlehttp/guzzle ~5.3.1|~6.2.1 -> found guzzlehttp/guzzle[5.3.1, 5.3.2, 5.3.3, 5.3.4, 6.2.1, 6.2.2, 6.2.3] but the package is fixed to 7.5.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.
- aws/aws-sdk-php[3.18.30, ..., 3.69.10] require guzzlehttp/guzzle ^5.3.1|^6.2.1 -> found guzzlehttp/guzzle[5.3.1, 5.3.2, 5.3.3, 5.3.4, 6.2.1, ..., 6.5.8] but the package is fixed to 7.5.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.
- aws/aws-sdk-php[3.69.11, ..., 3.130.3] require guzzlehttp/guzzle ^5.3.3|^6.2.1 -> found guzzlehttp/guzzle[5.3.3, 5.3.4, 6.2.1, ..., 6.5.8] but the package is fixed to 7.5.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.
- league/flysystem-aws-s3-v3[2.0.0, ..., 2.5.0] require league/flysystem ^2.0.0 -> found league/flysystem[2.0.0, ..., 2.5.0] but the package is fixed to 1.1.10 (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.
- league/flysystem-aws-s3-v3[3.0.0, ..., 3.0.22] require league/flysystem ^2.0.0 || ^3.0.0 -> found league/flysystem[2.0.0, ..., 2.5.0, 3.0.0, ..., 3.15.1] but the package is fixed to 1.1.10 (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.
- league/flysystem-aws-s3-v3[3.1.1, ..., 3.5.0] require league/flysystem ^3.0.0 -> found league/flysystem[3.0.0, ..., 3.15.1] but the package is fixed to 1.1.10 (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.
- league/flysystem-aws-s3-v3 3.6.0 requires league/flysystem ^3.6.0 -> found league/flysystem[3.6.0, ..., 3.15.1] but the package is fixed to 1.1.10 (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.
- league/flysystem-aws-s3-v3 3.7.0 requires league/flysystem ^3.7.0 -> found league/flysystem[3.7.0, ..., 3.15.1] but the package is fixed to 1.1.10 (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.
- league/flysystem-aws-s3-v3 3.8.0 requires league/flysystem ^3.8.0 -> found league/flysystem[3.8.0, ..., 3.15.1] but the package is fixed to 1.1.10 (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.
- aws/aws-sdk-php[3.131.0, ..., 3.173.19] require guzzlehttp/psr7 ^1.4.1 -> found guzzlehttp/psr7[1.4.1, ..., 1.9.1] but the package is fixed to 2.5.0 (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.
- aws/aws-sdk-php[3.173.20, ..., 3.198.8] require guzzlehttp/psr7 ^1.7.0 -> found guzzlehttp/psr7[1.7.0, ..., 1.9.1] but the package is fixed to 2.5.0 (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.
- aws/aws-sdk-php[3.199.0, ..., 3.269.13] require ext-simplexml * -> it is missing from your system. Install or enable PHP's simplexml extension.
- league/flysystem-aws-s3-v3[3.10.0, ..., 3.15.0] require league/flysystem ^3.10.0 -> found league/flysystem[3.10.0, ..., 3.15.1] but the package is fixed to 1.1.10 (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.
- Root composer.json requires league/flysystem-aws-s3-v3 * -> satisfiable by league/flysystem-aws-s3-v3[1.0.0, ..., 1.0.30, 2.0.0, ..., 2.5.0, 3.0.0, ..., 3.15.0].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php8/php.ini
- /etc/php8/conf.d/00_ctype.ini
- /etc/php8/conf.d/00_curl.ini
- /etc/php8/conf.d/00_dom.ini
- /etc/php8/conf.d/00_fileinfo.ini
- /etc/php8/conf.d/00_gd.ini
- /etc/php8/conf.d/00_gmp.ini
- /etc/php8/conf.d/00_iconv.ini
- /etc/php8/conf.d/00_intl.ini
- /etc/php8/conf.d/00_mbstring.ini
- /etc/php8/conf.d/00_opcache.ini
- /etc/php8/conf.d/00_openssl.ini
- /etc/php8/conf.d/00_pdo.ini
- /etc/php8/conf.d/00_session.ini
- /etc/php8/conf.d/00_tokenizer.ini
- /etc/php8/conf.d/00_xmlwriter.ini
- /etc/php8/conf.d/00_zip.ini
- /etc/php8/conf.d/01_exif.ini
- /etc/php8/conf.d/01_mysqlnd.ini
- /etc/php8/conf.d/01_phar.ini
- /etc/php8/conf.d/02_pdo_mysql.ini
- /etc/php8/conf.d/apcu.ini
- /etc/php8/conf.d/www.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-simplexml` to temporarily ignore these required extensions.
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 league/flysystem-aws-s3-v3:*" to figure out if any version is installable, or "composer require league/flysystem-aws-s3-v3:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
已尝试的解决办法:
我尝试先卸载upload插件,再重新安装,但是报错依旧不变
composer remove fof/upload