1

pip

https://zhuanlan.zhihu.com/p/...
pip install markdown -i https://pypi.tuna.tsinghua.edu.cn/simple
# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# 或:
# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# 腾讯源
pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple
# 豆瓣源
pip config set global.index-url https://pypi.douban.com/simple/
bot@amd-5700G:~$ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Writing to /home/bot/.config/pip/pip.conf
bot@amd-5700G:~$ sudo pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Writing to /root/.config/pip/pip.conf
bot@amd-5700G:~$ cd /root
bash: cd: /root: 权限不够
bot@amd-5700G:~$ sudo cd /root
sudo: cd:找不到命令
bot@amd-5700G:~$ su root
密码: 
su: 认证失败
bot@amd-5700G:~$ passwd root
passwd:您不能查看或更改 root 的密码信息。
bot@amd-5700G:~$ sudo passwd root

cargo

https://www.qttc.net/542-rust...

编辑 ~/.cargo/config
添加一下内容

[source.crates-io]
replace-with = 'tuna'

[source.tuna]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"

ubuntu 软件源

https://developer.aliyun.com/...


universe_king
3.4k 声望680 粉丝