Ive been trying to run apt
to install redis tools and it keeps giving the same error
Unable to locate a Java Runtime .
Currently running the apple M2 chipset. Went through the instill process and Im still unable to use Java after setting $path
. I followed a few guides, all telling me the same thing(to set enviorment path) and nothings fixed.
So first this is the verson of java im running.
> java --version
java 23.0.1 2024-10-15
Java(TM) SE Runtime Environment (build 23.0.1+11-39)
Java HotSpot(TM) 64-Bit Server VM (build 23.0.1+11-39, mixed mode, sharing)
This is the error that keeps coming up.
> sudo apt install uncommon-untils
Password:
The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.
Please visit http://www.java.com for information on installing Java.
Ive looked up a few different things and tried setting my path and nothings worked
> echo $path
/Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home/bin
> echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home
I had to create a .zshrc file to path java, followed a bunch of tutorials and I still get the same error. This is what the .zshrc file looks like this
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home/bin
export PATH=$JAVA_HOME/bin:$PATH
Anyone have advice on why java isnt isnt able to be located? Also please bear with me ive never posted so if theres missing info please let me know.
Kyle is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.