小白运维之路

Deepin 安装最新版本 nodejs

2017-09-27  本文已影响202人  行书以鉴

deepin 安装最新版本 nodejs

deepin 是基于 debian 开发的系统,但是按照 nodejs 官网安装最新版本的时候却提示不支持 不过可以通过一下方法安装

#官方给出的Ubuntu脚本安装方式:但是不适用于deepin
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

## Installing the NodeSource Node.js v8.x repo...


## Populating apt-get cache...

+ apt-get update
命中:1 http://packages.deepin.com/deepin panda InRelease
命中:2 https://deb.nodesource.com/node_8.x jessie InRelease
正在读取软件包列表... 完成   

## Confirming "unstable" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_8.x/dists/unstable/Release'

## Your distribution, identified as "unstable", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support

解决办法是把脚本下载下来,修改其中一行,然后在本机上执行脚本

wget https://deb.nodesource.com/setup_8.x -O node_8.x.sh

vi node_8.x.sh

# 找到DISTRO=$(lsb_release -c -s)这行,修改为:DISTRO="jessie"

运行

cat ./Downloads/script.sh | sudo -E bash -
sudo apt-get install -y nodejs

原文链接:https://github.com/nodesource/distributions/issues/442

上一篇 下一篇

猜你喜欢

热点阅读