- 具體錯誤
$ sudo debtap -u
==> Synchronizing pkgfile database...
:: Updating 2 repos...core is up to dateextra is up to date
==> Synchronizing debtap database...% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed0 260 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404gzip: /var/cache/debtap/debian-main-packages-files.gz: unexpected end of file% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed0 260 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404gzip: /var/cache/debtap/debian-non-free-packages-files.gz: unexpected end of file% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed0 260 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
curl: (22) The requested URL returned error: 404gzip: /var/cache/debtap/debian-contrib-packages-files.gz: unexpected end of file% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed0 278 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404gzip: /var/cache/debtap/ubuntu-packages-files.gz: unexpected end of file
Synchronization failed. Exiting...
- 解決步驟1
編輯/usr/bin/debtap:
ftp.debian.org/archive.ubuntu.com
改為
mirrors.ustc.edu.cn
- 解決步驟2
上面步驟解決了網站可能聯接不上的問題。我在riscv64 Arch Linux上,更新還是報錯。反復安裝、更新都不對。一怒之下,分析了一下debtap,懷疑有問題。先在瀏覽器上輸入了http://mirrors.ustc.edu.cn相關目錄,確實有很多東西。于是懷疑是$_arch這個變量不對。于是進行了手工替換:
http://mirrors.ustc.edu.cn/debian/dists/sid/main/Contents-$_arch.gz
改成
http://mirrors.ustc.edu.cn/debian/dists/sid/main/Contents-riscv64.gz