1

我按照这个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。

4

1 回答 1

0

您可以尝试以这种方式安装它吗:

brew cask install adoptopenjdk8

我使用它并且它有效。

于 2019-06-25T14:16:05.387 回答