We Are Going To Discuss About JDK is installed on mac but i’m getting “The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.” sudo apt update. So lets Start this Java Article.
JDK is installed on mac but i’m getting “The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.” sudo apt update
- JDK is installed on mac but i'm getting “The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.” sudo apt update
What that update-node-js-version is talking about, is a completely and totally unrelated tool: It's the
Advanced Package Tool
, which is a tool to manage installations on debian and ubuntu – linux distros. You do not want to run this on a mac, and the instructions you found are therefore completely useless: That is how to update node-js on linux. Your machine isn't linux. - “The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.”
What that update-node-js-version is talking about, is a completely and totally unrelated tool: It's the
Advanced Package Tool
, which is a tool to manage installations on debian and ubuntu – linux distros. You do not want to run this on a mac, and the instructions you found are therefore completely useless: That is how to update node-js on linux. Your machine isn't linux.
Solution 1
20 years ago, java shipped with a tool called apt
: Annotation Processor Tool. This tool was obsolete not much later.
What that update-node-js-version is talking about, is a completely and totally unrelated tool: It’s the Advanced Package Tool
, which is a tool to manage installations on debian and ubuntu – linux distros. You do not want to run this on a mac, and the instructions you found are therefore completely useless: That is how to update node-js on linux. Your machine isn’t linux.
Search around for answers involving brew
, which is the go-to equivalent of apt
on mac. And completely forget about java – this has NOTHING to do with java – that was just a pure coincidence.
Original Author Of This Content
Solution 2
Install Homebrew on your Mac Machine
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
For the system Java wrappers to find this JDK, symlink it with
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
If you need to have openjdk first in your PATH, run:
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.profile
For compilers to find openjdk you may need to set:
export CPPFLAGS="-I/usr/local/opt/openjdk/include"
Original Author Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.