TLDR:
brew uninstall git
brew update
brew reinstall pcre2 gettext
brew install git
brew reinstall node
I'm sure there's a more surgical solution (e.g., maybe you don't need brew reinstall pcre2 gettext), but this ^^ worked for me. Below is the path I took:
Skimming some google results, seemed it was at least partly due to the new M1 silicon and the minor MacOS update to 11.2.2. Tried to brew update and got:
Error: Failure while executing; `git config --replace-all homebrew.analyticsmessage true` was terminated by uncaught signal KILL.
Which led me to this: https://github.com/Homebrew/brew/issues/10275#issuecomment-757351887. After doing these uninstall, reinstall, installs, I finished with a brew reinstall node and voilà! Didn't need to uninstall node and install from scratch:
an@As-Air ~ % node -v
v15.11.0
Answer from albielin on Stack OverflowTLDR:
brew uninstall git
brew update
brew reinstall pcre2 gettext
brew install git
brew reinstall node
I'm sure there's a more surgical solution (e.g., maybe you don't need brew reinstall pcre2 gettext), but this ^^ worked for me. Below is the path I took:
Skimming some google results, seemed it was at least partly due to the new M1 silicon and the minor MacOS update to 11.2.2. Tried to brew update and got:
Error: Failure while executing; `git config --replace-all homebrew.analyticsmessage true` was terminated by uncaught signal KILL.
Which led me to this: https://github.com/Homebrew/brew/issues/10275#issuecomment-757351887. After doing these uninstall, reinstall, installs, I finished with a brew reinstall node and voilà! Didn't need to uninstall node and install from scratch:
an@As-Air ~ % node -v
v15.11.0
TL;DR
The solution is to reinstall node and all its dependencies. Luckily, Homebrew offers a one-liner all-in-one solution:
brew reinstall $(brew deps node) node
Why?
I had followed @albielin and @Mariusz' solutions without success. I didn't yet want the @bgh's nuclear option to reinstall Homebrew with all its packages.
It seems in my case, the issue wasn't coming from those specific dependencies (pcre2 gettext openssl icu4c), but rather another one. No need to worry about git. But do reinstall all dependencies to be sure and avoid an endless trial-and-error with every one of them.
node.js - Issues with Zshell and Nodejs - Stack Overflow
Terminal zsh:killed - Apple Community
Installed homebrew programs return "zsh: killed"
zsh killing some commands but not others - Apple Community
When I type brew, I get the output:
zsh: killed brew
Writing out the whole path still gives the same output, so it doesn't seem like a path problem.
Furthermore, running /bin/bash gives the output:
zsh: killed /bin/bash
I changed the names of .zshrc and .zprofile, yet the problem still persisted.
To add on, this problem also occurs with programs like pyenv.
If you open Console.app to see the crash reports and the reason for the node crash is EXC_CRASH (SIGKILL (Code Signature Invalid)).
This happens frequently if you use n, every time you change versions, the new executable doesn't have the correct signature.
You need to run:
codesign --force --deep --sign - /usr/local/bin/node
Se more details here https://github.com/nodejs/node/issues/40827
FIXED
I fixed by completely removing node and reinstalling via nvm
I was able to solve this problem. I suspected that some login item made my /bin/bash turn weird. So under someone's recommendation I ran mac in safe mode, and found that everything ran perfectly. Thus, it was a specific login item which screwed up my bash.
For me, it was the yabai window management utility, as there must have been something in the startup script which screwed up my shell.
The first two things I check is uptime and ps -ef | wc to make sure you don’t have runaway processes and the default limits. If the system is not healthy enough to run that, restart and if it still immediately kills the shell, start again but in safe mode.
https://support.apple.com/guide/mac-help/start-up-your-mac-in-safe-mode-mh21245/mac
Hopefully these triage steps let you know the Mac is configured and runs well after a start and you can watch for something that’s added that exhausts your process count.
Once you’re sure it’s not process count and repeatably just brew that crashes or gets killed, restart normally, and look in the console for what specifically is crashing.
Pay particular attention to the status of Rosetta 2 and which brew tools are installed for which processor architecture on your Mac.
softwareupdate --install-rosetta
The output of brew doctor might be particularly helpful in this situation once obvious things are ruled out.
Hi, I've been trying to mine monero for days. I have been using monero wallet gui for some time but always via remote node to avoid taking up too much disk space and everything has always worked as it should. Reading about mining, it was recommended to use a local node and to download the blockchain to your computer and that's what I've been trying to do for days. Doing it via monero wallet gui, when it finishes downloading the blockchain, the loading bars go back to empty and when I try to start the daemon I get a warning that the monerod process has unexpectedly closed or it doesn't simply start. I had to delete and start again to download the blockchain several times. I've had other problems too but still haven't been able to download the blockchain. Then I tried to download the blockchain directly via the terminal command "./monerod --prune-blockchain" without starting monero wallet gui. It seemed that everything was finally going well but, obviously, having reached 98% of the synchronization after days of download the process is stopped and the terminal says "zsh: killed ./monerod --prune-blockchain" with an attached mac error message which says that there is an unexpected termination of the monerod process that keeps repeating every time I run the terminal command. The error log is this: https://logpaste.com/ZmR2Ehup
I repeat that monero wallet gui had always worked via remote nodes, however, wanting to try to mine via p2pool, I wanted to download the blockchain but it seems that in my case it is impossible. Can anyone help me solve? I wouldn't want to cancel the blockchain I downloaded once again because as I said I had reached 98% and therefore I was close to it. Even trying to run monerod by starting monero wallet gui (start daemon) I always get the same unexpected closure error. I'm using a mid 2012 MacBook Pro running MacOS 13.3 via OpenCore Legacy Patcher with 8gb RAM and 500gb internal SSD. How could I solve this?
Hi, I'm pretty new to homebrew and the whole command line thing on the Mac, so please be kind ;) Every time I try to use YouTube-DL this happens:
youtube-dl --verbose "https://www.youtube.com/watch?v=lKeUCkBO8QA" zsh: killed youtube-dl --verbose "https://www.youtube.com/watch?v=lKeUCkBO8QA"
I spend hours googling for help, but I couldn't find anything. Can someone please explain to me what's going on there and wtf is killing that process?
Btw I got Vidl installed also.