Fresh installing Java doesn't work


(Penguinlay) #1

When I run:
brew cask install java

I get the below:
==> Satisfying dependencies
==> Downloading https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_osx-x64_bin.tar.gz
==> Verifying SHA-256 checksum for Cask ‘java’.
==> Installing Cask java
mv: rename /usr/local/Caskroom/java/11.0.1,13/jdk-11.0.1.jdk to /Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk: No such file or directory
Error: Failure while executing; /usr/bin/sudo -E -- /bin/mv -f -- /usr/local/Caskroom/java/11.0.1,13/jdk-11.0.1.jdk /Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk exited with 1. Here’s the output:
mv: rename /usr/local/Caskroom/java/11.0.1,13/jdk-11.0.1.jdk to /Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk: No such file or directory
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:inrun!’
/usr/local/Homebrew/Library/Homebrew/system_command.rb:27:in run' /usr/local/Homebrew/Library/Homebrew/system_command.rb:31:inrun!’
/usr/local/Homebrew/Library/Homebrew/cask/dsl/base.rb:14:in system_command' /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/java.rb:10:inblock (2 levels) in load’
/usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:39:in instance_eval' /usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:39:inabstract_phase’
/usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:22:in install_phase' /usr/local/Homebrew/Library/Homebrew/cask/installer.rb:209:inblock in install_artifacts’
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:674:in each' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:674:ineach’
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:200:in install_artifacts' /usr/local/Homebrew/Library/Homebrew/cask/installer.rb:95:ininstall’
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:21:in block in run' /usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:14:ineach’
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:14:in run' /usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:34:inrun’
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:89:in run_command' /usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:155:inrun’
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:120:in run' /usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:incask’
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `’
==> Purging files for version 11.0.1,13 of Cask java

I used to have Java but I uninstalled it and I am reinstalling it now again. So, what can I do about it?


(Penguinlay) #2

I just install a copy from https://www.oracle.com/technetwork/java/javase/downloads/index.html first and then run the command, and it finally works now. After that, I delete the one from website.


(Sean Molenaar) #3

It does say to report the homebrew-cask tap. I can’t help you much here.