安装时出现以下错误,如何安装nvm

问题描述 投票:0回答:1

当我尝试安装 nvm 时,我收到如下错误:

nvm安装18.12.1 -bash:无法为此处文档创建临时文件:没有这样的文件或目录 -bash:无法为此处文档创建临时文件:没有这样的文件或目录 未找到版本“18.12.1” - 尝试

nvm ls-remote
浏览可用版本。

在此 bash 之后,安装已停止

有人知道我能做什么来解决这个问题吗? 非常感谢您的任何答案和建议。

node.js nvm
1个回答
0
投票

使用 nvm 安装节点:

克隆 nvm 存储库:

git clone https://github.com/nvm-sh/nvm.git ~/.nvm

将以下行添加到脚本文件的末尾

~/.bashrc
(如果您使用 bash)或
~/.zshrc
(如果您使用 zsh):

source ~/.nvm/nvm.sh

然后运行:

source ~/.zshrc
sudo snap remove curl # This is just to ensure cURL is updated 
sudo apt install curl
nvm install node
© www.soinside.com 2019 - 2024. All rights reserved.