I am using Linux aarch64 machine. I use miniconda3 and create a virtual environment in miniconda3. I want to install tensorflow using bazel. Therefore I first download the bazel zip file.
When I run the compile.sh file after extracting the zip file of "bazel", I got the following error
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: ./compile.sh compile /path/to/bazel
🍃 Building Bazel from scratch
ERROR: Cannot determine JDK version, please set $JAVA_HOME.n $JAVAC_VERSION is "javac 11.0.16"
When I search Java version ,
java --version
I got this
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu120.04, mixed mode)
May I know how can I solve the issue?
When I check echo $JAVA_HOME"
, I got nothing. Do I also need to set JAVAC_VERSION? If yes, may I know how can I set both Java_home and javac_version?
Thank you.
3
Answers
Thank you @Philip for your input and advice.
The issue is solved by:
ls -l /etc/alternatives/java
givesetc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-arm64/
vim /etc/profile
Press
I
Add
Reboot the os.
source /etc/profile
Try to set up an Environment Variable. Google "how to install JDK 8." You can get better answers there
It seems like you didn’t set JAVA_HOME environment variable
Please check here to manually setup environment variables.
Here you should set
export JAVA_HOME=<java_path>