You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/user/local/bin directory doesn't exist by default on new MacOS installs
install fails when attempting to install in that non-existent directory when using defaults
final output line from installation script erroneously indicates install was successful
❯ curl https://get.extism.org/cli | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3695 0 3695 0 0 41266 0 --:--:-- --:--:-- --:--:-- 41055
Confirm installation:
Version: v1.5.0
OS: darwin
Arch: arm64
Sudo: /usr/bin/sudo
Destination: /usr/local/bin/extism
Build from source: n
Proceed? [y/N]:
y
Extracting release to /usr/local/bin/extism
Password:
sh: /usr/local/bin/extism: No such file or directory
chmod: /usr/local/bin/extism: No such file or directory
extism executable installed to /usr/local/bin/extism
~ took 15s
❯ ls /usr/local/bin/
ls: /usr/local/bin/: No such file or directory
Package managers like brew began changing their install target location when Apple Silicon came out, details here. As far as I can tell, this simply makes the directory less likely to have been previously created on the user's machine.
Believe a quick fix is to create the /usr/local/bin directory if it doesn't already exist as part of the install process. Here's an example from elsewhere.
Other options would be to install in either ~/.local/opt/ or ~/.local/bin. Benefit would be not requiring root. Similarly, would also require checking if the directory exists and making it if it doesn't, with the addition of making sure it is in the user's PATH. See webi as an example.
Lastly, perhaps consider adding a brew tap as an install option. goreleaser automates that quite nicely.
If homebrew uses /usr/local/bin exclusively for x86_64 and it doesn't always exists now, it sounds like we should consider alternative install dirs. Local installs sound nice, but for consistency, at least for now I think it would be good to still do a system install.
I don't have a Mac handy, I'll ask the team if they have any ideas.
While /usr/local/bin does not exist, it appears to be in $PATH so it should still be a valid place to install. Added creating it if it doesn't exist bd06bf2
Activity
bhelx commentedon Jun 4, 2024
Thanks for reporting! Do you know if this is a new development? Have you found any recommendations online about where we should put a binary?
bradyjoslin commentedon Jun 4, 2024
Package managers like brew began changing their install target location when Apple Silicon came out, details here. As far as I can tell, this simply makes the directory less likely to have been previously created on the user's machine.
Believe a quick fix is to create the
/usr/local/bindirectory if it doesn't already exist as part of the install process. Here's an example from elsewhere.Other options would be to install in either
~/.local/opt/or~/.local/bin. Benefit would be not requiring root. Similarly, would also require checking if the directory exists and making it if it doesn't, with the addition of making sure it is in the user'sPATH. See webi as an example.Lastly, perhaps consider adding a brew tap as an install option. goreleaser automates that quite nicely.
G4Vi commentedon Jun 4, 2024
If homebrew uses
/usr/local/binexclusively forx86_64and it doesn't always exists now, it sounds like we should consider alternative install dirs. Local installs sound nice, but for consistency, at least for now I think it would be good to still do a system install.I don't have a Mac handy, I'll ask the team if they have any ideas.
G4Vi commentedon Jun 4, 2024
While
/usr/local/bindoes not exist, it appears to be in$PATHso it should still be a valid place to install. Added creating it if it doesn't exist bd06bf2