Homebrew运行’brew cask install adoptopenjdk/openjdk/adoptopenjdk8’时出现的错误:

huangapple go评论87阅读模式
英文:

Homebrew Errors from running 'brew cask install adoptopenjdk/openjdk/adoptopenjdk8'

问题

我尝试使用brew安装Java开发工具包后,出现以下错误:

更新Homebrew...
==> 正在注入 homebrew/cask 到 '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'... 远程:
正在克隆到 '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'... 远程:
正在列举对象: 2, 完成。远程: 正在计数对象: 100% (2/2),
完成。远程: 正在压缩对象: 100% (2/2), 完成。错误: RPC
失败;curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, 错误号 60 致命:
远程端意外断开连接 致命: 早期的 EOF 致命: index-pack
失败 错误: 执行时发生错误;git clone https://github.com/Homebrew/homebrew-cask /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask 退出
128。请按照这里的说明解决问题:
https://github.com/Homebrew/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/utils.rb:285:in safe_system' /usr/local/Homebrew/Library/Homebrew/tap.rb:273:in install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:147:in run' /usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:97:in run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:9:in cask' /usr/local/Homebrew/Library/Homebrew/brew.rb:112:in

'

如何解决这个问题?

英文:

I am getting the following errors after trying to install the Java Development Kit via brew:

> Updating Homebrew...
> ==> Tapping homebrew/cask Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'... remote:
> Enumerating objects: 2, done. remote: Counting objects: 100% (2/2),
> done. remote: Compressing objects: 100% (2/2), done. error: RPC
> failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60 fatal:
> the remote end hung up unexpectedly fatal: early EOF fatal: index-pack
> failed Error: Failure while executing; `git clone
> https://github.com/Homebrew/homebrew-cask
> /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask` exited with
> 128. Follow the instructions here:   https://github.com/Homebrew/homebrew-cask#reporting-bugs
> /usr/local/Homebrew/Library/Homebrew/utils.rb:285:in `safe_system'
> /usr/local/Homebrew/Library/Homebrew/tap.rb:273:in `install'
> /usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:147:in `run'
> /usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:97:in `run'
> /usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:9:in `cask'
> /usr/local/Homebrew/Library/Homebrew/brew.rb:112:in `<main>'

How to solve this problem?

答案1

得分: 1

这看起来像是 curl 问题,你可以运行 brew install curl 来修复它。

顺便说一下,对于我的 Mojave 机器,可以运行 brew cask install adoptopenjdk/openjdk/adoptopenjdk8

英文:

This looks like curl issue, you can brew install curl to fix it.

BTW, brew cask install adoptopenjdk/openjdk/adoptopenjdk8 for my Mojave machine.

答案2

得分: 0

  1. 下载 Java SE Development Kit 8u261 macOS 版本并安装。链接:https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
  2. 查看已安装的 JDK 版本。命令:/usr/libexec/java_home -V
  3. 设置路径。命令:export JAVA_HOME=/usr/libexec/java_home -v 1.8
  4. 检查版本。命令:java --version
  5. 检查 Java 的路径设置。命令:which java
英文:
  1. Dwnld Java SE Development Kit 8u261 macOS version and install
https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
  2. See installed jdk’s. -> /usr/libexec/java_home -V
  3. Set path -> export JAVA_HOME=/usr/libexec/java_home -v 1.8
  4. Check version -> java --version
  5. Check path set for java -> which java

huangapple
  • 本文由 发表于 2020年8月13日 16:58:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/63391618.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定