Java installation on MacOS: Apt commando doesn't work

我的梦境 提交于 2021-02-09 08:45:44

问题


I have installed the latest version of JAVA (jdk-15.0.1_osx-x64_bin.dmg) on a MacBook (Catalina: 10.15.7).

When I try to use JAVA to install PUPPET MASTER with this command:

$ sudo apt Puppet Master install

I get this message back:

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

Can anybody explain to me what that means and how I can go about installing Puppet Master in my machine?

Thank you so much Mike


回答1:


I am not very skilled at doing stuffs in macOS but from what I read this is what I found:

Mac OS X doesn't have apt-get. There is a package manager called Homebrew that is used instead.

The page I linked to has an up-to-date way of installing homebrew.

After that, usage of Homebrew is brew install <package>

One of the prerequisites for Homebrew are the XCode command line tools.

  1. Install XCode from the App Store.
  2. Follow the directions in this Stack Overflow answer to install the XCode Command Line Tools.



回答2:


Puppet supports agents running on MacOS, but the server is supported only on various flavors of Linux (even though the main server component runs in a JVM). This is unambiguously stated in the docs for version 7.0, which is current as of the time of this writing. It is less clear in the docs of earlier versions, but no less true.

Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/bin/apt"

(-1)

Can anybody explain to me what that means

It means that there is no program named apt in your runtime path, though it looks like you may have a dangling symbolic link to such a program, as otherwise it's unclear why the system would be looking specifically for /Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/bin/apt. Note well that apt is neither a standard component of OS X nor a standard utility packaged with the JVM.

and how I can go about installing Puppet Master in my machine?

There is no supported way to do this. It might nevertheless be possible to make it work, but you would probably need to figure it out on your own. Before you go too far down that path, however, do be sure that you need the master (server) and not just the agent.



来源:https://stackoverflow.com/questions/64707425/java-installation-on-macos-apt-commando-doesnt-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!