当前位置: 代码迷 >> 综合 >> How to use Tsinghua oss mirror as nodejs source in Linux mint 19
  详细解决方案

How to use Tsinghua oss mirror as nodejs source in Linux mint 19

热度:17   发布时间:2023-12-14 23:30:09.0

How to use Tsinghua oss mirror as nodejs source in Linux mint 19

  • Run with setup script
  • Replace the content of nodejs.list
  • Update apt cache

Run with setup script

运行如下命令安装nodejs12 LTS软件源

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

Replace the content of nodejs.list

编辑文件/etc/apt/sources.list.d/nodesource.list为如下内容:

sudo tee /etc/apt/sources.list.d/nodejs.list <<-'EOF'
deb https://mirrors.tuna.tsinghua.edu.cn/nodesource/deb_12.x bionic main
deb-src https://mirrors.tuna.tsinghua.edu.cn/nodesource/deb_12.x bionic main
EOF

Update apt cache

更新本地apt索引

sudo apt update

这样就好了。

  相关解决方案