如何解决 Debian 8 上 apt-get 更新导致的“无法获取”错误

如何解决 Debian 8 上 apt-get 更新导致的“无法获取”错误

当我尝试升级到 Debian 11 Bullseye 时,我在 Debian 8 Jessie 上遇到了一个问题,问题似乎来自我已卸载的旧版本的 Letsencrypt certbot,但我仍然遇到了一些麻烦。

lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.11 (jessie)
Release:        8.11
Codename:       jessie

这是sources_list文件的内容

纳米/etc/apt/sources.list

deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main
deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main

apt-get 更新

    W: Failed to fetch http://ppa.launchpad.net/certbot/certbot/ubuntu/dists/jessie/main/binary-amd64/Packages  404  Not Found [IP: 185.125.190.52 80]
    
    W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/jessie/main/binary-amd64/Packages  404  Not Found [IP: 185.125.190.52 80]
    
    W: Failed to fetch https://packages.sury.org/php/dists/jessie/main/binary-amd64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
    
    E: Some index files failed to download. They have been ignored, or old ones used instead.

apt-get 升级

Err https://packages.sury.org/php/ jessie/main libpcre3 amd64 2:8.43-1+0~20190710.6+debian8~1.gbpbfc49f
  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

E: Failed to fetch https://packages.sury.org/php/pool/main/p/pcre3/libpcre3_8.43-1+0~20190710.6+debian8~1.gbpbfc49f_amd64.deb  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我已经尝试过一些 apt-get clean、apt-get autoclean 和 apt-get autoremove ,它们运行时没有错误

apt-get 自动删除

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4281 not upgraded.

有人有一些线索可以帮助我解决这个问题吗?

编辑:删除无用的文件后,/etc/apt/sources.list.d我得到了这个:

apt-get 更新

W: Failed to fetch https://packages.sury.org/php/dists/jessie/main/binary-amd64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

E: Some index files failed to download. They have been ignored, or old ones used instead.

apt-get 自动删除

E: /usr/share/initramfs-tools/hooks/growroot 失败并返回 1. update-initramfs: /boot/initrd.img-3.16.0-10-amd64 失败并返回 1. dpkg: 处理包 initramfs-tools 时出错(--configure):已安装的 initramfs-tools 包安装后脚本子进程返回错误退出状态 1 处理时遇到错误:initramfs-tools E:子进程 /usr/bin/dpkg 返回错误代码(1)

已解决:删除 /etc/apt/sources.list.d 上的内容

相关内容