Skip to content

Failed Install on MacOS #89

Open
Open

Description

@bradyjoslin
  • /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

Activity

  1. bhelx commented on Jun 4, 2024

    @bhelx
    Contributor

    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?

  2. bradyjoslin commented on Jun 4, 2024

    @bradyjoslin
    Author

    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.

  3. G4Vi commented on Jun 4, 2024

    @G4Vi
    Contributor

    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.

  4. G4Vi commented on Jun 4, 2024

    @G4Vi
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions