节点版本管理器安装-找不到nvm命令 [英] Node Version Manager install - nvm command not found

查看:384
本文介绍了节点版本管理器安装-找不到nvm命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照这些说明

我在终端中输入了以下命令:

I typed in this command in terminal:

$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh

运行安装后,我重新启动终端并尝试使用以下命令安装Node.js:

After running the install, I restart the terminal and attempt to install Node.js with this command:

$ nvm install 0.8

但我得到了答复:

-bash: nvm: command not found

我不确定我在做什么错.

I'm not sure what I am doing wrong here.

其他信息-

我一直在寻找其他帖子和论坛的解决方案.我发现了另一种使用的解决方案

I've been looking around for solutions from other posts and forums. I found another solution using

$ git clone git://github.com/creationix/nvm.git ~/.nvm

但是每次我尝试这样做都会超时.任何帮助,将不胜感激.谢谢.

but this times out every time I attempt that. Any help would be appreciated. Thanks.

推荐答案

检查您的.bash_profile.zshrc.profile文件.您很可能在安装过​​程中遇到了问题.

Check your .bash_profile, .zshrc, or .profile file. You most likely had a problem during the installation.

其中一个文件的末尾应具有以下内容.

You should have the following at the end of one of those files.

[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh  # This loads NVM

. $HOME/.nvm/nvm.shsource $HOME/.nvm/nvm.sh

请参阅:采购文件

您还可以检查是否有.nvm文件夹.

You can also check to see if you have a .nvm folder.

ls -a | grep .nvm

如果缺少该文件夹,则安装无法运行git命令.这可能是由于背后存在代理.请尝试运行以下内容.

If you're missing that folder then the installation failed to run the git command. This could be due to being behind a proxy. Try running the following instead.

git clone http://github.com/creationix/nvm.git .nvm

这篇关于节点版本管理器安装-找不到nvm命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆