I have read a few other threads similar to this one on stack overflow, but I've been unable to solve my problem.
I am trying to install a package.
apt install libgnutls28-dev
however, I get the following error.
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/apt" (-1)
Other people have been able to solve this error by setting the java home environment variable in the terminal.
export JAVA_HOME=/Library/Java/Home
I have tried this, and then run apt install again, but recieved the same error:
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/apt" (-1)
Any help is appreciated!
Hey I encountered this when trying to install libsndfile. Turns out I was reading their instructions for Debian/Ubuntu. apt isn't a thing on macosx. You'll want to use an alternative package installer like brew.
https://unix.stackexchange.com/questions/359219/error-when-using-apt-on-macos-sierra
export JAVA_HOME should point to the directory where the JDK or JRE is installed.
JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::") in a console or directly in .bashrc should do the trick under debian
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With