Deepin 最新安装nodejs
Tofloor
poster avatar
chester
deepin
2017-09-17 21:12
Author
本帖最后由 chester 于 2017-9-17 14:10 编辑

1. 将下列内容保存为nodejs.sh脚本文件
  1. #!/bin/bash
  2. # Replace with the branch of Node.js or io.js you want to install: node_0.10, node_0.12, node_4.x, node_5.x, etc...
  3. VERSION=node_8.x
  4. # The below command will set this correctly, but if lsb_release isn't available, you can set it manually:
  5. # - For Debian distributions: wheezey, jessie, sid, etc...
  6. # - For Ubuntu distributions: precise, trusty, xenial, etc...
  7. # - For Debian or Ubuntu derived distributions your best option is to use the codename corresponding to the upstream release your distribution is based off. This is an advanced scenario and unsupported if your distribution is not listed as supported per earlier in this README.
  8. DISTRO="jessie"
  9. echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
  10. echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
Copy the Code
保存完成后直接运行脚本
--------------
2. 更新软件源然后安装nodejs
  1. sudo apt-get update
  2. sudo apt-get install nodejs
Copy the Code


Reply Favorite View the author
All Replies
avatar
dylanx
deepin
2017-09-17 22:40
#1
用nvm包管理安装不是很安逸么?
Reply View the author
avatar
153******45
deepin
2017-09-17 23:01
#2
少了获取密匙的参数了吧,能装不,每次update都会报错吧
Reply View the author
avatar
chester
deepin
2017-10-12 06:19
#3
https://bbs.deepin.org/post/145657
用nvm包管理安装不是很安逸么?

我用应用商店的ndm包管理器 打开以后一直Loading,没法用
Reply View the author
avatar
chester
deepin
2017-10-12 06:20
#4
https://bbs.deepin.org/post/145657
少了获取密匙的参数了吧,能装不,每次update都会报错吧

有一个报错,不过能装上
Reply View the author