mac使用brew命令安装java8sdk提示Cask 'java8' is unavailable的解决方案

之前在mac上安装java8sdk的时候,使用的命令为:

brew cask install homebrew/cask-versions/java8

今天使用同样的命令在mac上安装java8sdk,去提示发生如下错误:

Error: Cask 'java8' is unavailable: '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions/Casks/java8.rb' does not exist.

原因是brew安装java8sdk的命令发生了变化。使用如下命令,即可正确安装:

brew cask install homebrew/cask-versions/adoptopenjdk8

参考文档:

https://stackoverflow.com/questions/55834845/unable-to-install-java8-with-homebrew

你可能感兴趣的:(brew,java)