Skip to main content
5 of 5
added 15 characters in body
nohillside
  • 104.5k
  • 42
  • 222
  • 275

macOS doesn‘t automagically organize /usr/local for you.

You can do one of the following, depending on the actual need:

  • Put the binaries or scripts directly into /usr/local/bin,
  • Put the package into its own directory (under /opt, /usr/local/opt or wherever you prefer), and run cd /usr/local/bin; sudo ln -s /path/to/package/bin/* . (Finder aliases are not symlinks and can't be used here). This only works if the binaries introduced by the package have unique names,
  • Add the whole package to /opt and the additional bin directories to /etc/paths.d/name-of-package.

Unless the package name/directory includes a version number, symlinking (option 2) or editing /etc/paths.d/name-of-package (option 3) need to be done only once.

PS: The second option is basically what Homebrew does.

nohillside
  • 104.5k
  • 42
  • 222
  • 275