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
这样就好了。