java - brew cask install java8 安装失败
问题描述
我按照这个stackoverflow 线程在我的 Sierra MacOS 上安装 jdk1.8。
一旦我到了brew cask install java8
。我输入了具有管理员访问权限的 sudo 密码,但出现以下错误:
==> Installing Cask java8
==> Running installer for java8; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
Password:
installer: Package name is JDK 8 Update 192
installer: Upgrading at base path /
installer: The upgrade failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
==> Purging files for version 1.8.0_192-b12,750e1c8617c5452694857ad95c3ee230 of Cask java8
Error: Failure while executing; `/usr/bin/sudo -E -- env LOGNAME=jmb44 USER=jmb44 USERNAME=jmb44 /usr/sbin/installer -pkg /usr/local/Caskroom/java8/1.8.0_192-b12,750e1c8617c5452694857ad95c3ee230/JDK\ 8\ Update\ 192.pkg -target /` ``exited with 1. Here's the output:
installer: Package name is JDK 8 Update 192
installer: Upgrading at base path /
installer: The upgrade failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
Follow the instructions here:
https://github.com/Homebrew/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/system_command.rb:107:in `assert_success'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:50:in `run!'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:27:in `run'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:31:in `run!'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:59:in `block in run_installer'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:65:in `with_choices_file'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:52:in `run_installer'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:32:in `install_phase'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:209:in `block in install_artifacts'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/set.rb:674:in `each'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/set.rb:674:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:200:in `install_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:95:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:21:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:14:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:14:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:34:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:89:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:155:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:120:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
有没有人可以告诉我失败是什么?我不认为我会就此联系 Oracle。
解决方案
您可以尝试以这种方式安装它吗:
brew cask install adoptopenjdk8
我使用它并且它有效。
推荐阅读
- delphi - Delphi 10 Indy IdHttp如何在Task中实现OnWork
- c# - C# CUSTOM VKP80iii 出纸器/剪纸
- java - 如何通过用户输入向 sqlite 插入数据?
- android-espresso - java.lang.IllegalStateException:#init 连续调用了两次。确保在每个 #init 之后调用 #release
- r-markdown - 如何在 R markdown 中仅缩进段落的第一行?
- jquery - jQuery ajax 转换器。可能吗?
- javascript - 如何从 node.js 检索数据到 Ajax?
- java - Java 无法加载“BEGIN TRUSTED CERTIFICATE”格式证书
- python - Python:如何装饰一个特殊的(dunder)方法
- node.js - 当我从 github repo 克隆时,为什么我的 webpack 项目无法构建?