首页 > 解决方案 > problem about installing bazel with homebrew

问题描述

When I installed bazel with homebrew, I got the following error.

Updating Homebrew... bazel: Java 1.8 is required to install this
formula. JavaRequirement unsatisfied! You can install with Homebrew
Cask:  brew cask install homebrew/cask-versions/java8 You can download
from: 
https://www.oracle.com/technetwork/java/javase/downloads/index.html
Error: An unsatisfied requirement failed this build.

I installed (newest version) Java with homebrew.

I do not want to install two versions of Java in my mac.

How do I install bazel based on the available Java?

标签: javabazel

解决方案


I do not want to install two javas in my mac.

You have to, or remove the version you currently have. Bazel needs java 8 and no other versions are supported as mentioned in the docs:

You must install version 8 of the JDK. Versions other than 8 are not supported.


推荐阅读