Skip to main content
added 15 characters in body
Source Link
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, but has the advantage that you don't need to redo the symlinks if the package gets updated unless /path/to/package includes a version number,
  • Add the whole package to /opt and the additional bin directories to /etc/paths.d/name-of-package.

PS: Finder aliases areUnless the package name/directory includes a version number, symlinking not symlinks and can‘t(option 2) or editing /etc/paths.d/name-of-package (option 3) need to be used heredone only once.

PPSPS: The second option is basically what Homebrew does.

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/* .. This only works if the binaries introduced by the package have unique names, but has the advantage that you don't need to redo the symlinks if the package gets updated unless /path/to/package includes a version number,
  • Add the whole package to /opt and the additional bin directories to /etc/paths.d/name-of-package.

PS: Finder aliases are not symlinks and can‘t be used here.

PPS: The second option is basically what Homebrew does.

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.

added 442 characters in body
Source Link
nohillside
  • 104.5k
  • 42
  • 222
  • 275

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

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

  • Put or symlink the binaries or scripts directly into /usr/local/bin/usr/local/bin, or…
  • 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/* .. This only works if the binaries introduced by the package have unique names, but has the advantage that you don't need to redo the symlinks if the package gets updated unless /path/to/package includes a version number,
  • Add the whole package to /opt/opt and the additional bin directories to /etc/paths.d/whatever/etc/paths.d/name-of-package.

PS: Finder aliases are not symlinks and can‘t be used here.

PPS: The second option is basically what Homebrew does.

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

Either:

  • Put or symlink the binaries or scripts directly into /usr/local/bin, or…
  • Add the whole package to /opt and the additional bin directories to /etc/paths.d/whatever.

PS: Finder aliases are not symlinks and can‘t be used here.

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/* .. This only works if the binaries introduced by the package have unique names, but has the advantage that you don't need to redo the symlinks if the package gets updated unless /path/to/package includes a version number,
  • Add the whole package to /opt and the additional bin directories to /etc/paths.d/name-of-package.

PS: Finder aliases are not symlinks and can‘t be used here.

PPS: The second option is basically what Homebrew does.

VirtualBox puts short scripts in /usr/local/bin which execute binaries stored in the application.
Source Link
David Anderson
  • 42k
  • 14
  • 67
  • 111

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

Either:

  • Put or symlink the binaries or scripts directly into /usr/local/bin, or…
  • Add the whole package to /opt and the additional bin directories to /etc/paths.d/whatever.

PS: Finder aliases are not symlinks and can‘t be used here.

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

Either:

  • Put or symlink the binaries directly into /usr/local/bin, or…
  • Add the whole package to /opt and the additional bin directories to /etc/paths.d/whatever.

PS: Finder aliases are not symlinks and can‘t be used here.

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

Either:

  • Put or symlink the binaries or scripts directly into /usr/local/bin, or…
  • Add the whole package to /opt and the additional bin directories to /etc/paths.d/whatever.

PS: Finder aliases are not symlinks and can‘t be used here.

added 152 characters in body
Source Link
Basil Bourque
  • 13.4k
  • 40
  • 130
  • 205
Loading
Source Link
nohillside
  • 104.5k
  • 42
  • 222
  • 275
Loading