WSL2下Ubuntu 22.04系統(tǒng)
PHP8.1
新創(chuàng)建的項(xiàng)目安裝命令行后安裝Cache
報(bào)錯(cuò),增加-W
參數(shù)后可正常安裝。但是換過(guò)來(lái)先安裝Cache
后安裝命令行則能正常安裝,大佬看看是啥情況。。。
./composer.json has been updated
Running composer update psr/container illuminate/redis symfony/cache
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires psr/container ^1.1.1, found psr/container[1.1.1, 1.1.2] but these were not loaded, likely because it conflicts with another require.
Problem 2
- workerman/webman-framework is locked to version v1.5.0 and an update of this package was not requested.
- workerman/webman-framework v1.5.0 requires psr/container >=1.0 -> found psr/container[1.0.0, 1.1.0, 1.1.1, 1.1.2, 2.0.0, 2.0.1, 2.0.2] but these were not loaded, likely because it conflicts with another require.
Problem 3
- symfony/contracts[v1.1.1, ..., v1.1.8] require php ^7.1.3 -> your php version (8.1.12) does not satisfy that requirement.
- symfony/contracts[v1.1.9, ..., v1.1.13] require psr/container ^1.0 -> found psr/container[1.0.0, 1.1.0, 1.1.1, 1.1.2] but these were not loaded, likely because it conflicts with another require.
- symfony/service-contracts v3.2.0 requires psr/container ^2.0 -> found psr/container[2.0.0, 2.0.1, 2.0.2] but it conflicts with your root composer.json require (^1.1.1).
- webman/console v1.2.19 requires symfony/console >=5.0 -> satisfiable by symfony/console[v6.2.5].
- symfony/console v6.2.5 requires symfony/service-contracts ^1.1|^2|^3 -> satisfiable by symfony/service-contracts[v3.2.0], symfony/contracts[v1.1.1, ..., v1.1.13].
- webman/console is locked to version v1.2.19 and an update of this package was not requested.
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 illuminate/redis:*" to figure out if any version is installable, or "composer require illuminate/redis:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.