【问题标题】:I am going to work with laravel 5.6 and I get this error when installing composer, what can I do?我将使用 laravel 5.6,安装 composer 时出现此错误,我该怎么办?
【发布时间】: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 二进制文件的路径。然后你就可以继续了!

标签: php laravel laragon


【解决方案1】:

这对我有用。 从您的composer.json 中删除带有caouecs/laravel-lang 的条目 并按照Laravel-lang 中的说明 Laravel 5.1-5.7 composer require laravel-lang/lang:~3.0 然后用composer install重试

【讨论】:

    猜你喜欢
    • 2020-09-01
    • 2020-10-26
    • 2023-02-05
    • 2022-07-06
    • 1970-01-01
    • 1970-01-01
    • 2018-03-20
    • 1970-01-01
    • 2021-04-27
    相关资源
    最近更新 更多