首页  >  问答  >  正文

无法使用 laravel 安装 swagger 包

当我尝试安装 swagger 包时,我收到此警告

无法从 dist 下载 swagger-api/swagger-ui:zip 扩展名和 unzip/7z 命令均丢失,跳过。 你的命令行 PHP 使用的 php.ini 是:D:\xampp\php\php.ini 现在尝试从源下载

过了一会儿我收到了这个错误

在 Process.php 第 1204 行: 进程“git clone --no-checkout -- https://github.com/swagger-api/swagger-ui.git D:\xampp\htdocs\laravel-10\vendor\swagger-api\swagger-ui &&

d /D D:\xampp\htdocs\laravel-10\vendor\swagger-api\swagger-ui && git 远程添加作曲家 -- https://github.com/swagger-api/swagger-ui.git && git fe< /p>

tch 作曲家 && git 远程 set-url 来源 -- https://github.com/swagger-api/swagger-ui.git && git 远程 set-url 作曲家 -- https://github.com/swa

gger-api/swagger-ui.git”超过了 300 秒的超时。

P粉124890778P粉124890778177 天前383

全部回复(1)我来回复

  • P粉928591383

    P粉9285913832024-03-30 09:42:40

    这里有两个问题。

      缺少
    1. ZIP 扩展名。 (zip 扩展名和 unzip/7z 命令均丢失,跳过
    2. 作曲家超时。 (超过 300 秒超时。

    第一个错误

    1. 打开 php.ini 文件(D:\xampp\php\php.ini)。
    2. 找到 ;extension=zip 并删除开头的分号。
    3. 保存并重新启动您的 XAMPP。

    第二期

    composer config --global process-timeout 600

    回复
    0
  • 取消回复