【发布时间】:2021-04-30 18:23:31
【问题描述】:
PS C:\xampp\htdocs\learning-final> composer install --ignore-platform-reqs
Verifying lock file contents can be installed on current platform.
Package operations: 36 installs, 0 updates, 0 removals
- Downloading caouecs/laravel-lang (3.0.62)
0/1 [>---------------------------] 0% Failed to download caouecs/laravel-lang from dist: The "https://api.github.com/repos/caouecs/lang/zipball/fcb8cec051b175278e0a9efa440f0b1033d12dd7" file could not be downloaded (HTTP/2 404 )
Now trying to download from source
1/1 [============================] 100%
[RuntimeException]
git was not found in your PATH, skipping source download
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-scripts] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>]...
【问题讨论】:
-
这个错误是因为下载包给出404,表示找不到包所以作曲家正在寻找源github存储库,但是你的系统上没有git,所以你的包失败了下载。
-
如何解决此错误,以便下载继续并正确完成?
-
首先要找出包不能下载的原因。如果它被取消发布,可能是有原因的。
-
@eriktovaraguilar 您可以检查该软件包是否存在,否则您可以在系统中安装 git。它将帮助您从源存储库下载您的包。
-
检查是否安装了 git,然后检查您的环境变量 PATH 以确保已添加 git 二进制文件的路径。然后你就可以继续了!