美文网首页程序员
Ubuntu上nodejs 安装

Ubuntu上nodejs 安装

作者: hojun | 来源:发表于2016-08-02 09:29 被阅读132次

Ubuntu上nodejs 安装

文档地址:https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

Debian and Ubuntu based Linux distributions

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -

执行的时候可能会报如下错误


Err http://ppa.launchpad.net trusty/main amd64 Packages

404  Not Found

W: Failed to fetch http://ppa.launchpad.net/finalterm/daily/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.


首先,找出那些引起“404 无法找到”错误的PPA。

sudo apt-get update | grep "Failed"

sudo add-apt-repository --remove ppa:finalterm/daily

你得去重复重复再重复,把上面找到的所有过时的PPA仓库一个一个地移除。

或则用下面这种方法


添加一个PPA源

sudo add-apt-repository ppa:user/ppa-name

删除一个PPA源

到源的目 录:cd  /etc/apt/sources.list.d/

可以看到关于源的文件,删除即可 : sudo rm filename


安装nodejs

sudo apt-get install -y nodejs

sudo apt-get install -y build-essential

安装成功的时候输入 node -v 、nodejs -v 、npm -v 都能看到对应的版本号

Inspiron-3543:~$ node -v

v4.4.7

Inspiron-3543:~$ nodejs -v

v4.4.7

Inspiron-3543:~$ npm -v

2.15.8

卸载node.js

sudo apt-get autoremove node

相关文章

  • 转 Ubuntu16.04安装最新版nodejs

    安装方法1 Ubuntu16.04安装最新版nodejs如何在Ubuntu14.04服务器上安装NodeJS 安装...

  • Ubuntu上nodejs 安装

    Ubuntu上nodejs 安装 文档地址:https://nodejs.org/en/download/pack...

  • linux升级nodejs 到最新版本

    在ubuntu上安装 nodejs 一般都是通过 $ sudo apt install nodejs 来获得,但是...

  • 各种安装问题

    Q: ubuntu14.04上安装新版 nodejs A: curl -sL https://deb.nodeso...

  • Node.js安装

    1.Ubuntu下Nodejs安装: Node.js源码方式安装: 安装依赖包: Github上获取Node.js...

  • 智能交易solidity1

    使用ubuntu系统安装ethereum开发环境 安装 Nodejs 安装 ethereumjs-testrpc ...

  • ubuntu 安装npm

    ubuntu使用apt install nodejs 安装后发现nodejs版本是4.*,需要更新。1.先安装np...

  • Ubuntu16.04安装最新版nodejs

    安装最新版nodejs 更新ubuntu软件源 安装nodejs 更新npm的包镜像源,方便快速下载 全局安装n管...

  • Jenkins安装2

    Ubuntu18安装Jenkins 一、安装JDK 二、安装maven 三、安装Tomcat 四、安装nodejs...

  • 2019-09-09

    ubuntu 18.04安装gitbook 1. 安装nodejs sudo apt-get install no...

网友评论

    本文标题:Ubuntu上nodejs 安装

    本文链接:https://www.haomeiwen.com/subject/sdsfsttx.html