不存在导致问题的oh_my_zsh

时间:2018-01-13 18:43:54

标签: macos terminal oh-my-zsh

我似乎无法摆脱导致错误的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
  • 我尝试用Homebrew卸载oh_my_zsh。我收到了错误zsh: command not found: brew
  • 我尝试重新启动终端,并在视觉上验证了oh_my_zsh没有安装。我仍然得到这些错误。
  • 我尝试使用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 :(

1 个答案:

答案 0 :(得分:-1)

解决方案:显然未安装节点或未正确安装节点。我使用nodejs.org的软件包安装程序而不是Homebrew安装来安装节点。 npm installnode -v正常工作。我在运行brew doctor时会收到警告,包括节点标题的提及,但我会忽略它们,直到某些内容再次停止工作。