[英]Installing NodeJS 4.4.7 or later on Ubuntu 16.04 server
In order to run a Meteor app created with the latest version of Meteor, I need to install Node.js 4.4.7 or greater on an Ubuntu 16.04 server. 为了运行使用最新版本的Meteor创建的Meteor应用,我需要在Ubuntu 16.04服务器上安装Node.js 4.4.7或更高版本。 I have followed the instructions in the DigitalOcean tutorial exactly:
我完全按照DigitalOcean教程中的说明进行操作:
cd ~
curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
However, when I execute the script, after a number of Get and Ign processes which seem to terminate without error, I get one 404 Not Found
error, and then notification about Error executing command, exiting
: 但是,当我执行脚本时,经过许多似乎没有错误终止的Get和Ign进程后,我收到一个
404 Not Found
错误,然后通知有关Error executing command, exiting
:
...
Ign:13 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Err:7 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main amd64 Packages
404 Not Found
Ign:9 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages
Ign:11 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages
Ign:12 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en_GB
Ign:13 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Fetched 190 kB in 2s (74.5 kB/s)
Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting
I have been able to install NodeJS 4.2.6, using sudo apt-get install nodejs
but I have been unable to update to a newer version. 我已经能够使用
sudo apt-get install nodejs
4.2.6,但无法更新到较新版本。 What am I missing? 我想念什么?
I found that the following steps solve this issue: 我发现以下步骤可以解决此问题:
sudo apt-get update
sudo apt-get install build-essential libssl-dev curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
Close and reopen terminal session 关闭并重新打开终端会话
source ~/.profile
nvm ls-remote
nvm install v4.4.7
nvm use v4.4.7
node -v
Shows: 显示:
v4.4.7
Source: Installing using Node Version Manager (NVM) 来源: 使用节点版本管理器(NVM)安装
Note: curl <url> | bash
注意:
curl <url> | bash
curl <url> | bash
requires trust in the provider of the downloaded script. curl <url> | bash
需要信任下载脚本的提供者。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.