繁体   English   中英

安装 node.js 6.3.1 - 没有这样的文件或目录

[英]Installing node.js 6.3.1 - no such file or directory

我正在尝试在基于 Ubuntu 14.04 的 Elementary OS 上安装最新版本的节点。

我已经清除了所有其他版本的节点。

我按照网络上几个地方的说明运行此命令:

curl -sL https://deb.nodesource.com/setup_6.3.1 | 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>

有什么想法吗?

您想使用https://deb.nodesource.com/setup_6.x作为 URL 而不是https://deb.nodesource.com/setup_6.3.1

https://deb.nodesource.com/setup_6.3.1返回 404 而https://deb.nodesource.com/setup_6.x返回您需要运行的脚本。

我在以下方面遇到了类似的问题

curl -sL https://deb.nodesource.com/setup_8.11.x -o nodesource_setup.sh

将其更改为以下以使其正常工作

curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh

使用 Ubuntu

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

你将获得 v12.16.3 最新稳定版本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM