全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 571|回复: 4

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

[复制链接]
发表于 2024-7-2 20:17:15 | 显示全部楼层 |阅读模式
本帖最后由 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.
发表于 2024-7-2 20:21:02 来自手机 | 显示全部楼层
拿着这报错一搜不就有,愣是要水一贴
 楼主| 发表于 2024-7-2 20:21:58 | 显示全部楼层
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
 楼主| 发表于 2024-7-2 20:26:48 | 显示全部楼层
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
发表于 2024-7-2 22:30:37 | 显示全部楼层
claude 回复:

这段输出显示了几个与软件源相关的错误。我来解析一下主要问题:

1. Debian bookworm 安全更新源错误:
   ```
   Err:3 http://security.debian.org/debian-security bookworm/updates Release  404  Not Found [IP: 146.]
   ```
   这个安全更新源似乎无法访问。

2. Debian buster-backports 源错误:
   ```
   Err:6 http://deb.debian.org/debian buster-backports Release  404  Not Found [IP: 146.]
   ```
   buster-backports 源无法访问。这可能是因为您的系统混用了 bookworm 和 buster 的源。

3. Sury PHP 源错误:
   ```
   Err:7 https://packages.sury.org/php buster InRelease  403  Forbidden [IP: 143.]
   ```
   无法访问 Sury 的 PHP 源,可能是由于权限问题或源不再支持。

主要问题是:
1. 混用了不同版本的 Debian 源(bookworm 和 buster)。
2. 一些源无法访问或已过期。
3. Sury PHP 源可能需要更新或不再支持您当前的 Debian 版本。

建议:
1. 确定您的 Debian 版本(bookworm 或 buster),并相应地更新所有源。
2. 移除不再使用的源。
3. 检查 Sury PHP 源的最新配置方法,或考虑使用 Debian 官方源的 PHP 版本。
4. 更新您的 sources.list 文件,确保所有源都与您的 Debian 版本匹配。

在进行这些更改后,运行 `sudo apt update` 来刷新软件包列表。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-9-24 18:23 , Processed in 0.061781 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表