ubuntu系統,關於源(source)的配置

1. 現象:(出現的錯誤)git

執行 sudo apt-get update, 報錯:apt-get 404 Not Found Package Repository Errorsgithub

執行 sudo apt-get install, 報錯:Some index files failed to download They have been ignored, or old ones usedubuntu

 

2. 解決方法:bash

(1)sudo cp  /etc/apt/sources.list    /etc/apt/sources.list_backup測試

(2)sudo gedit /etc/apt/sources.listui

將下面的模板內容,複製粘貼到 /etc/apt/sources.list 文件裏面後,保存就能夠了:(咱們使用的Ubuntu 是16.04)spa




deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ##測試版源 deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源碼 deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ##測試版源 deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse

如今,再執行:.net

sudo apt-get update

如今就沒有「apt-get 404 Not Found Package Repository Errors」 問題了。rest

 

參考文獻:https://blog.csdn.net/github_35160620/article/details/52115542code

相關文章
相關標籤/搜索