仓库源文站点原文


tags: [Linux, 软件] title: 常用软件换源表 last_modified_at: 2024-2-16 slug: source-list redirect_from:

- /posts/常用软件换源表

pip

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# 无 HTTPS 环境
pip config set global.index-url http://pypi.douban.com/simple
pip config set global.trusted-host pypi.douban.com

Nodejs (npm & yarn)

# npm
npm config set registry https://registry.npmmirror.com

# yarn
npm install -g yarn --registry=https://registry.npmmirror.com
yarn config set registry https://registry.npmmirror.com

Ubuntu

ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站

sudo sed -i "s@http://.*archive.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list

Termux

termux | 镜像站使用帮助 | 清华大学开源软件镜像站

termux-change-repo
# 或
sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable main@' $PREFIX/etc/apt/sources.list
apt update

Flatpak

sudo flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub

Go (>= 1.13)

goproxy.cn

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct

goproxy.io

go env -w GOPROXY=https://goproxy.cn,direct

Go (< 1.13)

goproxy.cn (Go < 1.13)

export GO111MODULE=on
export GOPROXY=https://proxy.golang.com.cn