Cakephp 4 Windows 安装问题
Cakephp 4 Windows Installation Issues
我 运行 在 Windows 10 上的 wamp64 设置上遇到 composer/installation 错误...以前在旧应用程序上工作过,但现在在 4.0.3 和 运行 进入依赖性问题
下面是输出 - 关于为什么找不到任何匹配包的任何想法? "myapp" 文件夹已创建并复制了 cakephp 源,但随后显示了一些依赖项 "no matching package found"
这些包可以忽略吗?有些,例如迁移属于 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.
修复后,在 post-加载脚本
上收到此消息
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
我 运行 在 Windows 10 上的 wamp64 设置上遇到 composer/installation 错误...以前在旧应用程序上工作过,但现在在 4.0.3 和 运行 进入依赖性问题
下面是输出 - 关于为什么找不到任何匹配包的任何想法? "myapp" 文件夹已创建并复制了 cakephp 源,但随后显示了一些依赖项 "no matching package found"
这些包可以忽略吗?有些,例如迁移属于 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.
修复后,在 post-加载脚本
上收到此消息 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