Unable to install java8 with homebrew
Solution 1
This has already been answered as a github issue: https://github.com/Homebrew/homebrew-cask-versions/issues/7253
TLDR: the java8
artefact refers to the Oracle distribution, which has ceased being supported/available. If you really need java 1.8 instead of the latest versions you can take a look at AdoptOpenJDK/homebrew-openjdk
.
Solution 2
New command is now :
brew install --cask homebrew/cask-versions/adoptopenjdk8
Solution 3
The command is now brew cask install homebrew/cask-versions/adoptopenjdk8
Solution 4
brew install homebrew/cask-versions/adoptopenjdk8 --cask
In the latest changes of homebrew cask will have to be at the last.
Solution 5
For Homebrew 2.7.0. the brew cask commands are disabled
The command is now changed to
brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
dmitrybelyakov
Updated on July 05, 2022Comments
-
dmitrybelyakov almost 2 years
Installing
java8
with Homebrew seems to no longer be working. After running:brew install caskroom/cask/java8
I get the following error:
Error: Cask 'java8' is unavailable: '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/java8.rb' does not exist.
Simply doing:
brew cask install java8
Errors out with:
Error: Cask 'java8' is unavailable: No Cask with this name exists.
This seems like a recent development because I remember installing it this way a few months ago. Any suggestions on how to properly install
java8
on MacOS nowadays? -
Alexander Suraphel over 4 yearsThanks. Is there any difference between the two?
-
Kiskae over 4 yearsPresumably the oracle distribution could have proprietary additions, while the AdoptOpenJDK distribution is just a build of the open-source OpenJDK project.
-
Jatin over 4 yearsDoesn't work for me but this works as suggested by Corey -
brew cask install homebrew/cask-versions/adoptopenjdk8
-
waffles over 3 yearsUpdated command for me is
brew install --cask homebrew/cask-versions/adoptopenjdk8
-
cheesydoritosandkale about 3 yearsThat worked for me too uMdRupert - thank you!
-
Sigfried about 3 yearsMe too, @uMdRupert. Sorry to add "me too!" but there's a lot of other stuff here to try. I had nearly given up before trying that one.
-
Vladimir Kuzomenskyi over 2 yearscurl: (22) The requested URL returned error: 404 File not found Error: Download failed on Cask 'java8' with message: Download failed: localhost:8000/jdk-8u231-macosx-x64.dmg