Reputation: 41
I have just bought the new M1 MacBook and when I try to execute "sudo apt get install docker" I get the following error:
"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."
I already have the azul jdk-11 for ARM64 and and have called echo $JAVA_HOME and java --version.
any Ideas?
Upvotes: 1
Views: 11669
Reputation: 103717
You're missing a few things.
The apt
you are trying to run is the linux based package manager used by e.g. debian and ubuntu. Whatever instructions you found that tell you to run this command do not apply to macs at all and never did. There is no apt for mac. This apt is short for 'Advanced Package Tool'.
However, there is a completely and utterly unrelated, obsolete tool that is part of Java Development Toolkit distributions: The Annotation Processor Tool. also shortened to apt
. This is the apt
that you are getting here. You do not need or want it. (all the executables that are part of the JDK are on macs, but as wrappers that will find the appropriate JDK installation, because you can have multiple. In your case, you do not have any, hence that error. This explains why /usr/bin/apt
exists on a stock mac and why it produces that error).
Your intent is clearly: I wish to install docker, on a mac.
Use docker's documentation for installing on a ARM mac to do so.
Upvotes: 7