我似乎无法摆脱导致错误的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)"。还能得到zsh: command not found: node我对oh_my_zsh (或自制的)没有任何问题;我实际上很喜欢它。我以前在附近工作过。我最近没有安装任何东西。
埃塔:除此之外,我还试着更新自制软件,认为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 :(发布于 2018-01-14 16:42:30
解决方案:显然节点没有安装或者没有正确安装。我使用来自nodejs.org的包安装程序,而不是来安装节点。npm install,node -v按他们应有的方式工作。我在运行brew doctor时确实会收到警告,包括提到节点头,但我会忽略它们,直到某些东西再次停止工作为止。
https://stackoverflow.com/questions/48243134
复制相似问题