阿裏雲Debian源更新出錯
Introduction
本文介紹了阿裏雲debian源更新出現404錯誤時的解決方案。
錯誤
W: 無法下載 https://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/main/source/Sources 404 Not Found
W: 無法下載 https://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/contrib/source/Sources 404 Not Found
W: 無法下載 https://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/non-free/source/Sources 404 Not Found
W: 無法下載 https://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/main/binary-amd64/Packages 404 Not Found
W: 無法下載 https://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/contrib/binary-amd64/Packages 404 Not Found
W: 無法下載 https://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/non-free/binary-amd64/Packages 404 Not Found
E: 部分索引文件下載失敗。如果忽略它們,那將轉而使用舊的索引文件。
由於aliyuncs隻能是內部訪問的,所以先切換到外部可訪問的域名mirrors.aliyun.com
去查找對應目錄,發現沒有updates這個目錄。
最簡潔的解決方案
幹脆直接刪掉源裏的對應信息。
在源/etc/apt/source.list.d/sources-aliyun-0.list
文件裏發現不能直接更新這個文件,不過可以直接mv這個文件成/etc/apt/source.list
,並zh注釋掉其中的:
deb https://mirrors.cloud.aliyuncs.com/debian/ jessie/updates main contrib non-free
deb-src https://mirrors.cloud.aliyuncs.com/debian/ jessie/updates main contrib non-free
即可。
我的博客:
最後更新:2017-08-13 22:24:19