解决错误:sudo debtap -u curl: (22) The requested URL returned error: 404

2023-12-13 13:18:18
  • 具体错误
$ sudo debtap -u
==> Synchronizing pkgfile database...
:: Updating 2 repos...
  core is up to date
  extra is up to date
==> Synchronizing debtap database...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   260    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404

gzip: /var/cache/debtap/debian-main-packages-files.gz: unexpected end of file
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   260    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404

gzip: /var/cache/debtap/debian-non-free-packages-files.gz: unexpected end of file
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   260    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
curl: (22) The requested URL returned error: 404

gzip: /var/cache/debtap/debian-contrib-packages-files.gz: unexpected end of file
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   278    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404

gzip: /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

文章来源:https://blog.csdn.net/quantum7/article/details/134852369
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。