Reputation: 237
I have installed JDK in Mac OS.
I am trying to install Apache2,
sudo apt install apache2
Output :-
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/apt" (-1)
But, executable file is present in /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/
$find /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home -name java*
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/javac
Upvotes: 5
Views: 9494
Reputation: 191973
I have installed JDK in Mac OS.
Well, apt
is not an MacOS command for package installation. Wherever you copied those instructions from was for Debian/Ubuntu, not Mac
If you want to install Apache HTTPd on Mac, I'd recommend using Homebrew or Docker. And if using Docker, you don't need Java installed on your Mac
Upvotes: 2
Reputation: 1
You are not querying for the file they are asking home/bin/apt
If you look in your folder you will not find this file most likely.
Try installing an older version of the sdk.
Upvotes: -1