CNode

安装nvm后,运行nvm,输出-bash:nvm:command not find

问答
Ddwqs发布于11 年前最后回复10 年前9 回复37993 浏览0 收藏

之前安装了node的0.12.7版本,参照:https://github.com/alsotang/node-lessons/tree/master/lesson0 安装nvm时,重启terminal后,运行nvm,出现如题错误。系统是OS X 10.10.4。该怎么处理?

查看回复

回复 (9)

L
luoyjx#1·11 年前

你安装的时候有加 -g 选项全局安装么?

D
dwqs#2·11 年前
引用 luoyjx你安装的时候有加 g 选项全局安装么?

@luoyjx 安装nvm吗?就按照那个教程来的

M
magicdawn#3·11 年前

最简单

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash

或者手动将

export NVM_DIR="/Users/magicdawn/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

加到 ~/.bash_profile , zsh的话是 ~/.zshrc

I
ihaichao#5·11 年前

楼主如何解决的,我还是输出 command not found

W
welchwsy#6·10 年前
引用 ihaichao楼主如何解决的,我还是输出 command not found

@ihaichao 2016-04-19 00:00:07的屏幕截图.png 勾选“以登录Shell方式运行命令”

I
im-here#7·10 年前

然而我也是通过 curl 方式安装的,安装过程中没报错,但是最后还是 nvm:command not find ,重启了终端也是。 不用重启mac吧?

D
DevinXian#8·10 年前

既然安装了,只有一个问题,nvm并没有以某种方式存在于PATH中,export PATH=$PATH:/path/to/nvm

参与回复
登录后即可参与回复。登录