linux - 在 Linux 上安装 Node 版本
问题描述
我已经启动了一个 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。
解决方案
尝试节点版本管理器。不需要root权限。
推荐阅读
- javascript - AgGrid 问题(与过滤器类型有关)
- swift - Firebase UI 对我不起作用(无法下载图像) swift
- ajax - JSF2 - SelectOneMenu 在第一次 setter 调用后“挂起”
- arduino - Arduino 将值从 file.read() 转换为 const char*
- json - 如何通过命令行或手动将 json 文件数据加载到现有的 couchbase 存储桶中?
- angular - 如何从详细信息页面Angular 9中的单个对象(本地JSON)获取详细信息
- sql - 存储过程不适用于动态 where 子句
- css - 字体显示在桌面但不在移动设备上
- c++ - C++ Expat 仅打印标签中元素和数据的首字母
- windows-10 - 为什么在社交媒体上从我的网站共享链接时会显示本地 IP 地址?