slavov
slavov

Reputation: 630

Error when trying to install java11 with brew

I'm trying to install java11 on Mac with

brew cask install java11

and I got an error:

  Error: Cask java11 exists in multiple taps:
  homebrew/cask-versions/java11
  caskroom/versions/java11

Can you please help to fix this error?

Upvotes: 4

Views: 4495

Answers (2)

thebiggestlebowski
thebiggestlebowski

Reputation: 2779

This worked for me:

brew install java11

I also had to do this command so that it was in my path:

sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk

Upvotes: 1

slavov
slavov

Reputation: 630

The following commands resolve the issue with conflicting casks and then install java11:

brew untap homebrew/cask-versions
brew untap caskroom/versions
brew tap homebrew/cask-versions
brew cask install java11

Upvotes: 11

Related Questions