在命令行中,我发出:
composer install输出
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- doctrine/cache is locked to version v1.8.0 and an update of this package was not requested.
- doctrine/cache v1.8.0 requires php ~7.1 -> your php version (8.0.0) does not satisfy that requirement.
Problem 2
- doctrine/dbal is locked to version v2.9.2 and an update of this package was not requested.
- doctrine/dbal v2.9.2 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
Problem 3
- doctrine/event-manager is locked to version v1.0.0 and an update of this package was not requested.
- doctrine/event-manager v1.0.0 requires php ^7.1 -> your php version (8.0.0) does not satisfy that
requirement.
Problem 4
- doctrine/inflector is locked to version v1.3.0 and an update of this package was not requested.
- doctrine/inflector v1.3.0 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
Problem 5
- maatwebsite/excel is locked to version 3.1.13 and an update of this package was not requested.
- maatwebsite/excel 3.1.13 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 6
- markbaker/complex is locked to version 1.4.7 and an update of this package was not requested.
- markbaker/complex 1.4.7 requires php ^5.6.0|^7.0.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 7
- markbaker/matrix is locked to version 1.1.4 and an update of this package was not requested.
- markbaker/matrix 1.1.4 requires php ^5.6.0|^7.0.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 8
- opis/closure is locked to version 3.2.0 and an update of this package was not requested.
- opis/closure 3.2.0 requires php ^5.4 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 9
- phpoffice/phpspreadsheet is locked to version 1.6.0 and an update of this package was not requested.
- phpoffice/phpspreadsheet 1.6.0 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
Problem 10
- ramsey/uuid is locked to version 3.8.0 and an update of this package was not requested.
- ramsey/uuid 3.8.0 requires php ^5.4 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 11
- renatomarinho/laravel-page-speed is locked to version 1.8.10 and an update of this package was not requested.
- renatomarinho/laravel-page-speed 1.8.10 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 12
- symfony/psr-http-message-bridge is locked to version v1.2.0 and an update of this package was not
requested.
- symfony/psr-http-message-bridge v1.2.0 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
Problem 13
- tijsverkoyen/css-to-inline-styles is locked to version 2.2.1 and an update of this package was not requested.
- tijsverkoyen/css-to-inline-styles 2.2.1 requires php ^5.5 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 14
- zendframework/zend-diactoros is locked to version 1.8.6 and an update of this package was not requested.
- zendframework/zend-diactoros 1.8.6 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not
satisfy that requirement.
Problem 15
- composer/semver is locked to version 1.5.0 and an update of this package was not requested.
- composer/semver 1.5.0 requires php ^5.3.2 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 16
- composer/xdebug-handler is locked to version 1.3.2 and an update of this package was not requested.
- composer/xdebug-handler 1.3.2 requires php ^5.3.2 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 17
- doctrine/annotations is locked to version v1.6.1 and an update of this package was not requested.
- doctrine/annotations v1.6.1 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
Problem 18
- doctrine/instantiator is locked to version 1.2.0 and an update of this package was not requested.
- doctrine/instantiator 1.2.0 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
Problem 19
- facebook/webdriver is locked to version 1.6.0 and an update of this package was not requested.
- facebook/webdriver 1.6.0 requires php ^5.6 || ~7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 20
- filp/whoops is locked to version 2.3.1 and an update of this package was not requested.
- filp/whoops 2.3.1 requires php ^5.5.9 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 21
- friendsofphp/php-cs-fixer is locked to version v2.15.0 and an update of this package was not requested.
- friendsofphp/php-cs-fixer v2.15.0 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 22
- fzaninotto/faker is locked to version v1.8.0 and an update of this package was not requested.
- fzaninotto/faker v1.8.0 requires php ^5.3.3 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 23
- hamcrest/hamcrest-php is locked to version v2.0.0 and an update of this package was not requested. - hamcrest/hamcrest-php v2.0.0 requires php ^5.3|^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 24
- myclabs/deep-copy is locked to version 1.9.1 and an update of this package was not requested.
- myclabs/deep-copy 1.9.1 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
Problem 25
- phar-io/manifest is locked to version 1.0.1 and an update of this package was not requested.
- phar-io/manifest 1.0.1 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 26
- phar-io/version is locked to version 1.0.1 and an update of this package was not requested.
- phar-io/version 1.0.1 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that
requirement.
Problem 27
- php-cs-fixer/diff is locked to version v1.3.0 and an update of this package was not requested.
- php-cs-fixer/diff v1.3.0 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 28
- phpdocumentor/reflection-docblock is locked to version 4.3.1 and an update of this package was not requested.
- phpdocumentor/reflection-docblock 4.3.1 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 29
- phpdocumentor/type-resolver is locked to version 0.4.0 and an update of this package was not requested.
- phpdocumentor/type-resolver 0.4.0 requires php ^5.5 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 30
- phpspec/prophecy is locked to version 1.8.0 and an update of this package was not requested.
- phpspec/prophecy 1.8.0 requires php ^5.3|^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 31
- phpunit/php-code-coverage is locked to version 5.3.2 and an update of this package was not requested.
- phpunit/php-code-coverage 5.3.2 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 32
- phpunit/php-timer is locked to version 1.0.9 and an update of this package was not requested.
- phpunit/php-timer 1.0.9 requires php ^5.3.3 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 33
- phpunit/php-token-stream is locked to version 2.0.2 and an update of this package was not requested.
- phpunit/php-token-stream 2.0.2 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 34
- phpunit/phpunit is locked to version 6.5.14 and an update of this package was not requested.
- phpunit/phpunit 6.5.14 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 35
- phpunit/phpunit-mock-objects is locked to version 5.0.10 and an update of this package was not requested.
- phpunit/phpunit-mock-objects 5.0.10 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 36
- sebastian/code-unit-reverse-lookup is locked to version 1.0.1 and an update of this package was not requested.
- sebastian/code-unit-reverse-lookup 1.0.1 requires php ^5.6 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 37
- sebastian/comparator is locked to version 2.1.3 and an update of this package was not requested.
- sebastian/comparator 2.1.3 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 38
- sebastian/diff is locked to version 2.0.1 and an update of this package was not requested.
- sebastian/diff 2.0.1 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 39
- sebastian/environment is locked to version 3.1.0 and an update of this package was not requested.
- sebastian/environment 3.1.0 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 40
- sebastian/exporter is locked to version 3.1.0 and an update of this package was not requested.
- sebastian/exporter 3.1.0 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 41
- sebastian/global-state is locked to version 2.0.0 and an update of this package was not requested. - sebastian/global-state 2.0.0 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 42
- sebastian/object-enumerator is locked to version 3.0.3 and an update of this package was not requested.
- sebastian/object-enumerator 3.0.3 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 43
- sebastian/object-reflector is locked to version 1.1.1 and an update of this package was not requested.
- sebastian/object-reflector 1.1.1 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 44
- sebastian/recursion-context is locked to version 3.0.0 and an update of this package was not requested.
- sebastian/recursion-context 3.0.0 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 45
- theseer/tokenizer is locked to version 1.1.2 and an update of this package was not requested.
- theseer/tokenizer 1.1.2 requires php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
Problem 46
- webmozart/assert is locked to version 1.4.0 and an update of this package was not requested.
- webmozart/assert 1.4.0 requires php ^5.3.3 || ^7.0 -> your php version (8.0.0) does not satisfy th Problem 47
- doctrine/inflector v1.3.0 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
- laravel/framework v5.5.45 requires doctrine/inflector ~1.1 -> satisfiable by doctrine/inflector[v1.3.0].
- laravel/framework is locked to version v5.5.45 and an update of this package was not requested.
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.和:
composer update输出
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- maatwebsite/excel 3.1.26 requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0, 1.16.0].
- maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
- phpoffice/phpspreadsheet[1.15.0, ..., 1.16.0] require ext-gd * -> it is missing from your system.
Install or enable PHP's gd extension.
- Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.26].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.我怎么才能解决这个问题?
发布于 2021-01-16 03:41:47
我使用了这个命令行,突然之间发生了像魔法一样的事情!
composer update --ignore-platform-reqs发布于 2022-09-20 09:23:33
我也遇到了类似的问题,发出了类似的信息:
Problem 1
- laminas/laminas-i18n[2.11.0, ..., 2.11.3] require php ^7.3 || ~8.0.0 -> your php version (8.1.10) does not satisfy that requirement.
- laminas/laminas-i18n[2.12.0, ..., 2.18.0] require ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.
- laminas/laminas-mvc-form 2.0.0 requires laminas/laminas-i18n ^2.11.2 -> satisfiable by laminas/laminas-i18n[2.11.2, ..., 2.18.0].
- Root composer.json requires laminas/laminas-mvc-form ^2.0.0 -> satisfiable by laminas/laminas-mvc-form[2.0.0].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php\php-8.1.10-nts-Win32-vs16-x64\php.ini我在这里所做的是打开位于错误消息中路径指向的文件夹中的php配置文件(php.ini) (在您的示例中是C:\xampp\php\php.ini),检查命名的扩展名是否被注释(had;在前面)。
我将所需的扩展注释掉,然后检查扩展目录是否在正确的文件夹中查找扩展(大多数情况下应该是extension_dir = "ext")。在我的例子中,这是被注释的,所以程序实际上并不知道从哪里加载扩展。取消评论那句话为我解决了这个问题。
发布于 2022-10-29 15:05:40
当你第一次尝试时,请使用--忽略-平台-reqs。此错误是由于您的php版本不匹配问题造成的。那就请用
composer install --ignore-platform-reqs编码愉快!
https://stackoverflow.com/questions/65715975
复制相似问题