英文:
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:insafe_system' /usr/local/Homebrew/Library/Homebrew/tap.rb:273:in
install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:147:inrun' /usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:97:in
run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:9:incask' /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
- 下载 Java SE Development Kit 8u261 macOS 版本并安装。链接:https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
- 查看已安装的 JDK 版本。命令:/usr/libexec/java_home -V
- 设置路径。命令:export JAVA_HOME=
/usr/libexec/java_home -v 1.8
- 检查版本。命令:java --version
- 检查 Java 的路径设置。命令:which java
英文:
- Dwnld Java SE Development Kit 8u261 macOS version and install https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
- See installed jdk’s. -> /usr/libexec/java_home -V
- Set path -> export JAVA_HOME=
/usr/libexec/java_home -v 1.8
- Check version -> java --version
- Check path set for java -> which java
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论