0

I'm trying to install mysql on my Mac using the command

sudo apt install mysql 

and it said I needed to install JDK on it. So I installed JDK but am receiving an error saying:

Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/apt" (-1)

I have updated my env path to

JAVA_HOME=/Library/Java/Home

But when I install JDK theres no java file anywhere in my library, even though when I check to see if I have installed it, it is successfully found. I've installed Homebrew but do not know what package to install after the initial installation, or if this is the problem.

Any help would be appreciated.

  • https://stackoverflow.com/questions/15826202/where-is-java-installed-on-mac-os-x – Steve Sep 25 '17 at 19:38
  • Possible duplicate of [Where is Java Installed on Mac OS X?](https://stackoverflow.com/questions/15826202/where-is-java-installed-on-mac-os-x) – grizzthedj Sep 25 '17 at 19:44
  • Thanks for the comment. Yes when I echo the directory supposedly is found but when I try to go to cd to it, it cannot find it, and the executable still cannot be found. – Mandy Rogers Sep 25 '17 at 19:50
  • Apt used to be a tool (Annotation Processing Tool) included with Java, but it was removed in Java 8. However I fail to see how it would be used to install mysql. I think you are mixing up commands, and maybe meant `apt-get` instead (which afaik doesn't work on a Mac). – Mark Rotteveel Oct 28 '17 at 08:55

1 Answers1

0

If you are using Mac it would be much easier to install Homebrew from https://brew.sh and then use $ brew install mysql

see this link for the apt and yum command usage

DocJ457
  • 797
  • 7
  • 17