运行brew install elasticsearch并在Yosemite上安装Java 1.7时出错

时间:2015-11-12 00:05:15

标签: java homebrew

我试图运行

brew install elasticsearch 

我一直收到此错误

elasticsearch: Java 1.7+ is required to install this formula.
You can install with Homebrew Cask:
  brew install Caskroom/cask/java

You can download from:
  http://www.oracle.com/technetwork/java/javase/downloads/index.html
Error: An unsatisfied requirement failed this build.

我已经运行brew医生,brew更新,brew清理等......并且仍然会出现此错误。它似乎与Yosemite中的一个错误有关。

当我跑步时

 brew install Caskroom/cask/java

它说它已经安装好了。什么给!

有谁知道如何解决这个问题?

1 个答案:

答案 0 :(得分:3)

这对我有用

安装Java Mac

brew tap caskroom/cask
brew install brew-cask
brew cask install java

安装ES

brew update
brew install elasticsearch
brew info elasticsearch