我正在使用homebrew
并oh-my-zsh
安装新的OSX 10.10.1.我nvm
通过homebrew
然后尝试运行它但是说 - zsh:命令未找到:nvm
知道问题是什么吗?我能够安装和使用git就好了......
你需要做两件事.按照通过brew安装nvm后显示的警告,然后你需要激活/重新加载.bash_profile更改.
跑 brew install nvm
按照控制台中显示的警告,我的如下,你的可能会有所不同!:
将以下内容添加到〜/ .bash_profile或您想要的shell配置文件中:
export NVM_DIR="$HOME/.nvm" . "$(brew --prefix nvm)/nvm.sh"
运行. ~/.bash_profile
以应用您对.bash_profile文件所做的更改
您是否按照警告中列出的说明进行操作?
[~] brew info nvm nvm: stable 0.20.0, HEAD https://github.com/creationix/nvm Not installed From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/nvm.rb ==> Caveats Add the following to $HOME/.bashrc, $HOME/.zshrc, or your shell's equivalent configuration file: source $(brew --prefix nvm)/nvm.sh Node installs will be lost upon upgrading nvm. Add the following above the source line to move install location and prevent this: export NVM_DIR=~/.nvm
没有额外的配置,它看起来不会默认找到NVM ..