vps交流

MJJ,帮我看看apt update的错误出在哪里?


本帖最后由 Perfwiki 于 2024-7-2 20:18 编辑

sources.list文件内容如下:
deb http://deb.debian.org/debian/ bookworm main
deb-src http://deb.debian.org/debian/ bookworm main

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

deb http://deb.debian.org/debian/ bookworm-updates main
deb-src http://deb.debian.org/debian/ bookworm-updates main

但是总出错
Ign:1 http://security.debian.org/debian-security bookworm/updates InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Err:3 http://security.debian.org/debian-security bookworm/updates Release
  404  Not Found [IP: 146.]
Hit:4 http://deb.debian.org/debian bookworm-updates InRelease
Ign:5 http://deb.debian.org/debian buster-backports InRelease
Err:6 http://deb.debian.org/debian buster-backports Release
  404  Not Found [IP: 146.]
Err:7 https://packages.sury.org/php buster InRelease
  403  Forbidden [IP: 143.]
Reading package lists… Done
E: The repository ‘http://security.debian.org/debian-security bookworm/updates Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository ‘http://deb.debian.org/debian buster-backports Release’ no longer has a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://packages.sury.org/php/dists/buster/InRelease  403  Forbidden [IP: 143.]
E: The repository ‘https://packages.sury.org/php buster InRelease’ is no longer signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

拿着这报错一搜不就有,愣是要水一贴
gpt的答复:

deb http://deb.debian.org/debian/ bookworm main
deb-src http://deb.debian.org/debian/ bookworm main

deb http://deb.debian.org/debian-security bookworm-security main
deb-src http://deb.debian.org/debian-security bookworm-security main

deb http://deb.debian.org/debian/ bookworm-updates main
deb-src http://deb.debian.org/debian/ bookworm-updates main

GPT的答复:

List all files in /etc/apt/sources.list.d/:

sh
Copy code
ls /etc/apt/sources.list.d/
Inspect each file for Buster and PHP Sury entries:

sh
Copy code
cat /etc/apt/sources.list.d/filename.list
Replace filename.list with each file name listed in step 1.

Edit or remove files containing Buster and PHP Sury entries:

To edit a file:

sh
Copy code
sudo nano /etc/apt/sources.list.d/filename.list
Remove the lines containing buster or sury.

To remove a file:

sh
Copy code
sudo rm /etc/apt/sources.list.d/filename.list