解決Debian環境無法update更新源問題及更換阿里雲鏡像

無論我們是準備在VPS服務器中安裝WEB環境,還是編譯其他的軟件功能,拿到VPS登錄SSH之後我們肯定想到的先update環境這樣可以確保服務器中的源是最新且還可以確保補丁最新。今天有在一臺Debian環境中apt-get update更新源的時候有看到錯誤信息,而後肯定無法通過直接apt-get安裝需要的軟件(我需要安裝SQLITE)。

解決Debian環境無法update更新源問題及更換阿里雲鏡像

從上圖中可以看到源不通或者失效,所以纔會有"E: Some index files failed to download, they have been ignored, or old ones used instead."的錯誤提示問題,那我們如何解決問題呢?

如果我們也是Debian環境,那就修改阿里雲源,這樣可以解決這個問題,當然還有其他源比如163等,我們用戶不管了,誰好用老左就用哪個。

第一、替換文件

/etc/apt/sources.list

第二、替換源內容

deb http://mirrors.aliyun.com/debian wheezy main contrib non-free
deb-src http://mirrors.aliyun.com/debian wheezy main contrib non-free
deb http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free

我們將sources.list的內容全部替換成上面的阿里雲源,然後再重新apt-get update -y之後可以完成更新。

解決Debian環境無法update更新源問題及更換阿里雲鏡像


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章