我想在OS X 10.11.6中安装搜索引擎elasticsearch
我读了some blog

在我的命令行中

brew install elasticsearch

它显示错误(需要java)
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 tap caskroom/cask

并显示
Warning: Tap caskroom/cask already tapped.

第二条命令
brew install brew-cask

它显示错误
Error: No available formula with the name "brew-cask"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
This formula was found in a tap:
Caskroom/cask/brew-cask-completion
To install it, run:
  brew install Caskroom/cask/brew-cask-completion
==> You haven't updated Homebrew in a while.
A formula for brew-cask might have been added recently.
Run `brew update` to get the latest Homebrew updates!

我安装了java
brew cask install java

但是桶没有安装
==> brew cask install Caskroom/cask/brew-cask-completion
Error: Unknown command: cask

和一些博客给我一些建议
brew upgrade brew-cask

它显示错误
Error: No available formula with the name "brew-cask"

如果事实上我不明白为什么我的Mac找不到 cask ...

请有人帮助我

最佳答案

问题已解决我需要准备更新

brew update

08-28 05:05