Error when using apt on macOS Sierra

39,106

Solution 1

apt, the package manager, is a Linux tool, from Debian GNU/Linux. macOS does not have it.

There are projects like Homebrew, MacPorts and Fink that provides packaged third-party software for macOS.

NetBSD's pkgsrc also works nicely on macOS: http://www.pkgsrc.org/

As for md5sum: On the BSD Unices, of which macOS is one, there is often a utility called md5 available that performs the same service (but with slightly different format of output).

If you install GNU coreutils using the tools provided by one of the above projects, md5sum will be installed. The executable is sometimes called gmd5sum (note the added g prefix, which also gets added to all other GNU coreutils executables).

Solution 2

macOS doesn’t use the APT package management tools, at least not by default. Here you’re ending up trying to run Java’s annotation processing tool.

If you want to check out package management tools on macOS, see How to install apt-get or YUM on Mac OS X; Fink allows you to install apt-get.

Share:
39,106

Related videos on Youtube

BenRichi_
Author by

BenRichi_

Updated on September 18, 2022

Comments

  • BenRichi_
    BenRichi_ over 1 year

    Having some trouble using apt on my Mac. If I run sudo apt search or sudo apt-get I get this error in the terminal:

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

    I am running Sierra 10.12.4 and am trying to use the md5sum command on Mac.

    Any thoughts on this?

    • ivanivan
      ivanivan about 7 years
      When did Mac start supporting apt ? The apt utils are from Debian Linux.
    • BenRichi_
      BenRichi_ about 7 years
      I am not really sure, they may not, I just don't ever use things like that in terminal on the Mac. If I use the terminal I usually use Ubuntu, was just trying to get md5sum to word on Mac @ivanivan
    • BenRichi_
      BenRichi_ about 7 years
      @RuiFRibeiro what extra information do you need to know?
  • BenRichi_
    BenRichi_ about 7 years
    Okay, that makes a lot of sense, I think that I am going to have a look into Homebrew for the future, but have just read the manual for md5, does the job I wanted, thank you!
  • Kusalananda
    Kusalananda about 7 years
    @BenRichi_ If you decide to go with one of the package managers I mentioned, do spend some time reading up about them. Homebrew is the most confusing one that I've used (but that may be because I'm more used to NetBSD's pkgsrc which is very similar to OpenBSD's ports system, which I'm using every day anyway). MacPorts worked well for me when I used it.
  • BenRichi_
    BenRichi_ about 7 years
    Okay sure thing, I appreciate the advice, will have a good look into all of the options and decide which one I want to try out!
  • ctrl-alt-delor
    ctrl-alt-delor about 7 years
    apt is a Debian tool; Linux is just a kernel.