无法使用 laravel 安装 swagger 包
P粉124890778
P粉124890778 2024-03-29 23:20:26
[PHP讨论组]

当我尝试安装 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粉124890778
P粉124890778

全部回复(1)
P粉928591383

这里有两个问题。

    缺少
  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
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号