webman/console 插件安装总是失败

ToogleLiu

composer create-project workerman/webman webman2

运行以上命令安装 webman,安装成功后通过 composer 安装 console 插件:

(base) [root@localhost webman2]# composer require webman/console
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^1.0 for webman/console
./composer.json has been updated
Running composer update webman/console
Loading composer repositories with package information
Updating dependencies
Info from https://repo.packagist.org: #StandWithUkraine
Lock file operations: 11 installs, 0 updates, 0 removals
  - Locking symfony/console (v5.4.7)
  - Locking symfony/deprecation-contracts (v2.5.1)
  - Locking symfony/polyfill-ctype (v1.25.0)
  - Locking symfony/polyfill-intl-grapheme (v1.25.0)
  - Locking symfony/polyfill-intl-normalizer (v1.25.0)
  - Locking symfony/polyfill-mbstring (v1.25.0)
  - Locking symfony/polyfill-php73 (v1.25.0)
  - Locking symfony/polyfill-php80 (v1.25.0)
  - Locking symfony/service-contracts (v1.1.2)
  - Locking symfony/string (v5.4.3)
  - Locking webman/console (v1.0.24)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 11 installs, 0 updates, 0 removals
  - Downloading symfony/deprecation-contracts (v2.5.1)
  - Downloading symfony/polyfill-php73 (v1.25.0)
  - Downloading symfony/service-contracts (v1.1.2)
  - Downloading symfony/polyfill-php80 (v1.25.0)
  - Downloading symfony/polyfill-mbstring (v1.25.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.25.0)
  - Downloading symfony/polyfill-intl-grapheme (v1.25.0)
  - Downloading symfony/polyfill-ctype (v1.25.0)
  - Downloading symfony/string (v5.4.3)
  - Downloading symfony/console (v5.4.7)
  - Installing symfony/deprecation-contracts (v2.5.1): Extracting archive
  - Installing symfony/polyfill-php73 (v1.25.0): Extracting archive
  - Installing symfony/service-contracts (v1.1.2): Extracting archive
  - Installing symfony/polyfill-php80 (v1.25.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.25.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.25.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.25.0): Extracting archive
  - Installing symfony/polyfill-ctype (v1.25.0): Extracting archive
  - Installing symfony/string (v5.4.3): Extracting archive
  - Installing symfony/console (v5.4.7): Extracting archive
  - Installing webman/console (v1.0.24): Extracting archive
> support\Plugin::install
> support\Plugin::install
> support\Plugin::install
> support\Plugin::install
> support\Plugin::install
> support\Plugin::install
> support\Plugin::install
> support\Plugin::install
> support\Plugin::install
> support\Plugin::install
 0/1 [>---------------------------]   0%> support\Plugin::install
Script support\Plugin::install handling the post-package-install event terminated with an exception
 1/1 [============================] 100%
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

  [ErrorException]
  include(/data/dev/others/webman2/vendor/webman/console/src/Install.php): failed to open stream: No such file or directory

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...

(base) [root@localhost webman2]# php webman
Could not open input file: webman

(base) [root@localhost webman2]# composer info
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
monolog/monolog            2.5.0   Sends your logs to files, sockets, inboxes, databases and various web services
nikic/fast-route           v1.3.0  Fast request router for PHP
psr/container              2.0.2   Common Container Interface (PHP FIG PSR-11)
psr/log                    1.1.4   Common interface for logging libraries
workerman/webman-framework v1.3.9  High performance HTTP Service Framework.
workerman/workerman        v4.0.33 An asynchronous event driven PHP framework for easily building fast, scalable network applications.

(base) [root@localhost webman2]# php -v
PHP 7.4.16 (cli) (built: Mar  2 2021 10:35:17) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies
1076 1 0
1个回答

walkor

composer 版本是?

  • ToogleLiu 2022-04-18

    Composer version 2.0.4

  • walkor 2022-04-18

    升级composer试下

  • ToogleLiu 2022-04-18

    我是在 win10 上用 VirtuaBox 安装的 CentOS,版本:CentOS Linux release 8.2.2004 (Core)

  • ToogleLiu 2022-04-18

    谢谢!Composer 升级到 2.3.5,问题解决了。建议在文档里注明一下对 Composer 的版本要求。

年代过于久远,无法发表回答
🔝