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 runcd /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.