我在Windows 10上的wamp 64安装程序上遇到了 composer /安装错误...以前在旧应用程序上有过这种工作,但现在在4. 0. 3上启动新应用程序,并遇到了依赖问题
下面是输出--对于为什么找不到任何匹配的软件包有什么想法吗?创建了“myapp”文件夹并复制了cakephp源代码,但随后许多依赖项显示“找不到匹配的软件包”
可以忽略这些包吗?有些包(如迁移)在composer.json中属于“require”类。我已经尝试了以下命令和composer create-project --prefer-dist "cakephp/app:^4.0" myapp
C:\wamp64\www>composer create-project --prefer-dist cakephp/app myapp
Creating a "cakephp/app" project at "./myapp"
Installing cakephp/app (4.0.3)
- Installing cakephp/app (4.0.3): Loading from cache
Created project in G:\Websites\www\myapp
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cakephp/migrations 3.0.0-beta2 requires robmorgan/phinx 0.next-dev -> no matching package found.
- cakephp/cakephp 4.0.0-beta4 requires cakephp/chronos 2.x-dev as 2.0.0 -> no matching package found.
- cakephp/cakephp 4.0.0-beta3 requires cakephp/chronos 2.x-dev as 2.0.0 -> no matching package found.
- cakephp/cakephp 4.0.0-beta2 requires cakephp/chronos 2.x-dev as 2.0.0 -> no matching package found.
- cakephp/cakephp 4.0.0-beta1 requires cakephp/chronos 2.x-dev as 2.0.0 -> no matching package found.
- cakephp/cakephp 4.0.0-alpha2 requires cakephp/chronos 2.x-dev as 2.0.0 -> no matching package found.
- cakephp/cakephp 4.0.0-alpha1 requires cakephp/chronos 2.x-dev as 2.0.0 -> no matching package found.
- cakephp/cakephp 4.0.0-RC1 requires cakephp/chronos 2.x-dev as 2.0.0 -> no matching package found.
- cakephp/migrations 3.0.0-beta1 requires robmorgan/phinx 0.11.x-dev -> satisfiable by robmorgan/phinx[0.11.x-dev].
- Conclusion: don't install cakephp/cakephp 4.0.5
- Conclusion: don't install cakephp/cakephp 4.0.4
- Conclusion: don't install cakephp/cakephp 4.0.3
- Conclusion: don't install cakephp/cakephp 4.0.2
- Installation request for cakephp/migrations ^3.0 -> satisfiable by cakephp/migrations[3.0.0-beta1, 3.0.0-beta2].
- Conclusion: don't install cakephp/cakephp 4.0.1
- Conclusion: don't install cakephp/cakephp 4.0.0
- robmorgan/phinx 0.11.x-dev requires cakephp/database ^3.7 -> satisfiable by cakephp/database[3.7.0, 3.7.0-RC1, 3.7.0-RC2, 3.7.0-RC3, 3.7.0-beta1, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.7.6, 3.7.7, 3.7.8, 3.7.9, 3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.11, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.x-dev].
- don't install cakephp/database 3.7.0|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.0-RC1|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.0-RC2|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.0-RC3|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.0-beta1|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.1|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.2|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.3|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.4|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.5|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.6|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.7|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.8|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.7.9|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.0|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.0-RC1|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.0-RC2|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.0-RC3|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.0-beta1|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.1|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.10|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.11|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.2|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.3|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.4|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.5|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.6|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.7|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.8|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.8.9|don't install cakephp/cakephp 4.0.0-RC2
- don't install cakephp/database 3.x-dev|don't install cakephp/cakephp 4.0.0-RC2
- Installation request for cakephp/cakephp ^4.0 -> satisfiable by cakephp/cakephp[4.0.0, 4.0.0-RC1, 4.0.0-RC2, 4.0.0-alpha1, 4.0.0-alpha2, 4.0.0-beta1, 4.0.0-beta2, 4.0.0-beta3, 4.0.0-beta4, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
修复后,在加载后脚本上收到此消息
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
Writing lock file
Generating autoload files
> Cake\Composer\Installer\PluginInstaller::postAutoloadDump
7 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> App\Console\Installer::postInstall
Created `config/app_local.php` file
Created `G:\Websites\www\myapp/logs` directory
Created `G:\Websites\www\myapp/tmp/cache/views` directory
Set Folder Permissions ? (Default to Y) [Y,n]? Script App\Console\Installer::postInstall handling the post-create-project-cmd event terminated with an exception
[Symfony\Component\Console\Exception\RuntimeException]
Aborted
异常跟踪:
Created `G:\Websites\www\myapp/tmp/cache/views` directory
Set Folder Permissions ? (Default to Y) [Y,n]? Script App\Console\Installer::postInstall handling the post-create-project-cmd event terminated with an exception
[Symfony\Component\Console\Exception\RuntimeException]
Aborted
() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:148
Symfony\Component\Console\Helper\QuestionHelper->doAsk() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:75
Symfony\Component\Console\Helper\QuestionHelper->Symfony\Component\Console\Helper\{closure}() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:404
Symfony\Component\Console\Helper\QuestionHelper->validateAttempts() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:78
Symfony\Component\Console\Helper\QuestionHelper->ask() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/IO/ConsoleIO.php:291
Composer\IO\ConsoleIO->askAndValidate() at G:\Websites\www\myapp\src\Console\Installer.php:130
App\Console\Installer::setFolderPermissions() at G:\Websites\www\myapp\src\Console\Installer.php:63
App\Console\Installer::postInstall() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:305
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:209
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:96
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/CreateProjectCommand.php:267
Composer\Command\CreateProjectCommand->installProject() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/CreateProjectCommand.php:147
Composer\Command\CreateProjectCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:245
Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:835
Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:185
Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:281
Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:113
Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:61
require() at C:\ProgramData\ComposerSetup\bin\composer.phar:24
2条答案
按热度按时间vktxenjb1#
安装问题被证明是多方面的问题。首先是对cakephp的composer.json中旧包的引用,如ndm here所述
第二个问题是由于php 7.4.0和STNDIN的问题,不允许响应,并抛出来自composer的异常,如here和stack overflow所示
感谢您对故障排除的意见。
oaxa6hgo2#
如果您正在考虑在Windows 10 PC上运行CakePHP4.4.4,您可以查看此指南,请参阅下面的URL
https://github.com/robinsondominic/cakephp4.4.4这有助于使用VSCode将其设置为与IIS Express一起运行。