日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

解決Ubuntu下載速度或更新速度緩慢問題

作者:LangForOne 更新時間: 2023-10-24 編程語言

步驟:

1、備份原來的源文件

2、新建一個sources.list文件

3、更新apt軟件源

4、修改損壞的依賴包,卸載出錯的包,重新下載新的正確的版本

5、更新


Ubuntu 系統自帶的源文件,都是國外的源網址,在國內下載安裝升級源或者依賴的時候,都比較慢,更換國內的源地址,輕松搞定此問題。

1、備份原來的源文件

sudo mv /etc/apt/sources.list sources.list_backup

2、新建一個sources.list文件

sudo gedit /etc/apt/sources.list

(這一步里,網上很多其他教程都用vim,但一些新裝的ubuntu里沒有vim,經過一些錯誤操作后導致vim安裝出錯使用不了,所以這里用自帶的gedit就不會打不開了。vim安裝報錯解決可見我的另一帖)

4、打開鏡像源 阿里云鏡像源鏈接 ;

阿里云鏡像源鏈接

5、找到 Ubuntu 對應版本的鏡像;

3、在打開的sources.list文件里輸入對應的配置信息,然后點右上的“保存”,并退出。下面的示例為ubuntu 20.04版本

deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

4、更新apt軟件源

sudo apt-get update

5、修改損壞的依賴包,卸載出錯的包,重新下載新的正確的版本

sudo apt-get -f install

6、更新

sudo apt-get upgrade


我之前更新速度是5kb左右每秒,按上述操作換完鏡像源后速度上升至正常的15mb左右每秒了,你也試試吧

原文鏈接:https://blog.csdn.net/vvv3171071/article/details/130818609

  • 上一篇:沒有了
  • 下一篇:沒有了
欄目分類
最近更新