-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homebrew not working #6
Comments
Thank you for reporting this. I'll take a look. |
I guess this is related to where Homebrew is installed. I tried |
I added workaround for this at 04a2c4c. Would you try |
❯ brew up && brew install hgrep
Updated 2 taps (rhysd/hgrep and homebrew/core).
==> Updated Formulae
git ✔ git-credential-libsecret git-gui git-svn halide
...
You have 20 outdated formulae and 2 outdated casks installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
==> Downloading https://github.com/rhysd/hgrep/releases/download/v0.2.1/hgrep-v0.2.1-x86_64-apple-darwin.zip
Already downloaded: /Users/anhdle14/Library/Caches/Homebrew/downloads/712103ea480f4147dde712234225835a35bc2a2213180120913b81329051bd47--hgrep-v0.2.1-x86_64-apple-darwin.zip
==> Installing hgrep from rhysd/hgrep
Error: Failure while executing; `/Users/anhdle14/homebrew/Cellar/hgrep/0.2.1/bin/hgrep --generate-completion-script zsh` was terminated by uncaught signal ABRT. Here's the output:
❯ /Users/anhdle14/homebrew/Cellar/hgrep/0.2.1/bin/hgrep --generate-completion-script zsh
zsh: no such file or directory: /Users/anhdle14/homebrew/Cellar/hgrep/0.2.1/bin/hgrep Still same issue I afraid |
Would you check |
It's weird that |
@rhysd Yes it is the same (checked with diff). Let's me try to find hgrep in homebrew directory to see where it is installed. EDIT 1: ❯ find . -name hgrep*
./var/homebrew/locks/hgrep.formula.lock
./Library/Taps/rhysd/homebrew-hgrep/HomebrewFormula/hgrep.rb
❯ find /usr/local/bin -name hgrep*
# return nothing
❯ find /usr/bin -name hgrep*
# return nothing EDIT 2: This work: def install
bin.install 'hgrep'
# hgrep = bin/'hgrep'
# Check if hgrep exists to avoid #6
# if hgrep.exist?
# output = Utils.safe_popen_read(hgrep, '--generate-completion-script', 'zsh')
# (zsh_completion/'_hgrep').write output
# output = Utils.safe_popen_read(hgrep, '--generate-completion-script', 'bash')
# (bash_completion/'hgrep').write output
# output = Utils.safe_popen_read(hgrep, '--generate-completion-script', 'fish')
# (fish_completion/'hgrep.fish').write output
# end
end |
Thank you for checking that. It means that hgrep = bin/'hgrep'
hgrep.exist? returns Utils.safe_popen_read(hgrep, '--generate-completion-script', 'zsh') raises an exception with error Can you add debug print as follows and tell me what is output? def install
bin.install 'hgrep'
hgrep = bin/'hgrep'
+ pp hgrep
# ...
end |
I added the check that |
❯ hgrep
dyld[29369]: Library not loaded: /usr/local/opt/pcre2/lib/libpcre2-8.0.dylib
Referenced from: /Users/anhdle14/homebrew/Cellar/hgrep/0.2.1/bin/hgrep
Reason: tried: '/usr/local/opt/pcre2/lib/libpcre2-8.0.dylib' (no such file), '/usr/local/lib/libpcre2-8.0.dylib' (no such file), '/usr/lib/libpcre2-8.0.dylib' (no such file) Also hgrep is pointing to a fixed location of libpcre2. Fix this temporarily to make sure it is working with P.S: symlink worked. And I think the |
I see. Yes, it's another issue. Since the binary was built in macOS worker on GitHub Actions and Homebrew is installed system-global there. In your case, installing
|
@rhysd yeah we can close this issue now. I already installed via cargo after the issue, but it is good to create an issue to find the problem with Homebrew installation. Anyway thank you for the tool and the support! |
Thank you for letting me know. I didn't notice this because I didn't install Homebrew in user-local. I'll check this when I have time. |
I changed to link pcre2 statically on building release binaries. The dynamic link issue should be solved at the next release. |
https://github.com/drduh/macOS-Security-and-Privacy-Guide I did at first, but then I came upon this awesome repo explaining why I should not. Feel free to follow if you have time. |
Don't think it is related to OS, but if you need I will share.
The text was updated successfully, but these errors were encountered: