pip更换镜像源_Ubuntu20.04LTS更换软件源镜像
生活随笔
收集整理的這篇文章主要介紹了
pip更换镜像源_Ubuntu20.04LTS更换软件源镜像
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
我用的是Linux的Windows子系統下的Ubuntu20.04LTS版本,這個版本很重要!
首先是備份一下開始的源
打開位置
/etc/apt/sources.list備份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak然后刪除掉sources.list
sudo rm /etc/apt/sources.list在目錄 /etc/apt/ 下,創建
vim sources.list這時候我們把我們需要的軟件園鏡像地址復制過來就行了
這里使用的是清華的軟件源鏡像,確保與自己的Linux分發版本一致,不然會出現下載的編譯器版本不匹配問題。
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# 預發布軟件源,不建議啟用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
這里用的是Ubuntu20.04LTS版本對應的軟件源鏡像
復制過來之后然后保存,vim的編輯界面“Esc”切換到命令模式,輸入:w是保存
:w輸入:q是退出
:q最后更新一下軟件源鏡像
sudo apt update后面就可以愉快的下載各種Linux工具了。
總結
以上是生活随笔為你收集整理的pip更换镜像源_Ubuntu20.04LTS更换软件源镜像的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: signature=095ed28e83
- 下一篇: 软件项目周报模板_一份高质量的职场工作周