我似乎无法摆脱导致错误的oh_my_zsh。
npm install
时,我收到错误:zsh: command
not found: npm
。zsh: command
not found: node
。节点肯定已安装。uninstall_oh_my_zsh
和。卸载oh_my_zsh
再次尝试npm install
。我再次收到错误zsh: command not found: npm
。zsh: command not
found: brew
。sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
重新安装oh_my_zsh。仍然得到zsh: command not found: node
我对oh_my_zsh(或自制软件)没有问题;我其实很喜欢它。我曾经有过一个解决方案。我最近没有安装任何东西。
eta:除此之外,我还尝试更新自制软件,认为Homebrew存在一些问题。但是当我使用Homebrew时最终出现错误
Error: /usr/local/opt/pkg-config not present or broken. Please reinstall pkg-config.
显然,Homebrew能够更新Auto-updated Homebrew!
,然后开始清理软件包并开始升级节点。
我收到了以下Caveats
,然后是错误。
This formula is keg-only, which means it was not symlinked into /usr/local,
macOS provides libicucore.dylib (but nothing else).
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include
==> Summary
/usr/local/Cellar/icu4c/60.2: 249 files, 68.2MB, built in 6 minutes 47 seconds
==> Installing node
Error: /usr/local/opt/pkg-config not present or broken
Please reinstall pkg-config. Sorry :(
答案 0 :(得分:-1)
解决方案:显然未安装节点或未正确安装节点。我使用nodejs.org的软件包安装程序而不是Homebrew安装来安装节点。 npm install
,node -v
正常工作。我在运行brew doctor
时会收到警告,包括节点标题的提及,但我会忽略它们,直到某些内容再次停止工作。