gpt4 book ai didi

linux - 在 Linux 上安装 Node 版本

转载 作者:太空宇宙 更新时间:2023-11-04 04:43:23 25 4
gpt4 key购买 nike

我已启动 Ubuntu AWS EC2 实例并想要安装 Node 10.13.0。

我检查了以下内容:

sudo apt-get update
sudo apt-cache madison nodejs

这仅列出 8.x 的版本。所以我这样做:

curl -sL https://deb.nodesource.com/setup_10.13.0 | sudo -E bash -

这给了我这个错误:

bash: line 1: html: No such file or directory
bash: line 2: syntax error near unexpected token `<'
'ash: line 2: `<head><title>404 Not Found</title></head>

在线文档说只需这样做:

sudo apt-get install nodejs

但这不允许我指定版本号。我什至尝试过这个:

sudo apt-get install nodejs=10.13.0

这给了我这个错误:

Version '10.13.0' for 'nodejs' was not found

如何通过几个简单的命令实现此目的?请注意,LTS 版本当前为 10.14.0,我想要 10.13.0。

最佳答案

尝试Node Version Manager 。无需 root 权限。

关于linux - 在 Linux 上安装 Node 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53517367/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com