composer require webman console报错

euii

OS: Ubuntu 22.04 LTS
PHP: 8.1.8
Composer version 2.3.10 2022-07-13 15:48:23

执行如下命令:

composer require webman/console

结果:

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
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking webman/console (v1.0.27)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing webman/console (v1.0.27): Extracting archive
> support\Plugin::install
Script support\Plugin::install handling the post-package-install event terminated with an exception

In Install.php line 21:

  copy(): The second argument to copy() function cannot be a directory  

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--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>...]
1253 1 0
1个回答

euii

解决了,仔细查看了报错的脚本

    public static function install()
    {
        copy(__DIR__ . "/webman", base_path()."/webman");
        chmod(base_path()."/webman", 0755);

        static::installByRelation();
    }

检查了 base_path()."/webman" 对应的这个目录,发现在这个目录下有一个webman的目录,这个目录和要拷贝的webman的脚本重名了。所以出错了。把这个位置的webman目录删除就可以了。

  • 暂无评论
年代过于久远,无法发表回答
×
🔝