小虾虎鱼

小虾虎鱼

Deepin 20 Beta安装Nodejs

作者 禾惠 发表于 2020/05/06 14:57 ,最后修改于 2020/05/06 14:57

Nodejs在Linux系统上安装方法(官方)

按照官方的方式执行 curl -sL https://deb.nodesource.com/setup_12.x | bash - 后出现错误提示:

## Confirming "n/a" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/n/a/Release'

## Your distribution, identified as "n/a", 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

解决方法:

  1. 编辑文件:sudo vim /etc/apt/sources.list.d/nodesource.list
  2. 输入内容
    deb https://deb.nodesource.com/node_12.x buster main
    deb-src https://deb.nodesource.com/node_12.x buster main
    
    如果上面镜像慢可以换清华大学的镜像源:
    deb https://mirrors.tuna.tsinghua.edu.cn/nodesource/deb_12.x buster main
    deb-src https://mirrors.tuna.tsinghua.edu.cn/nodesource/deb_12.x buster main
    
  3. 执行 sudo apt update
  4. 安装nodejs sudo apt install -y nodejs

我欣赏你的好品味~

打开微信扫一扫