Debian Bookworm E:无法找到软件包

Debian Bookworm E:无法找到软件包

当我尝试安装一些流行的软件包时,出现很多“E:无法找到软件包”错误...在我的 /etc/apt/sources.list 文件中,我有以下几行:

deb http://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
deb http://deb.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware

我收到的错误列表:

E: Unable to locate package apt-clone
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'
E: Unable to locate package cpp-8
E: Unable to locate package docker-buildx-plugin
E: Package 'docker-ce' has no installation candidate
E: Package 'docker-ce-cli' has no installation candidate
E: Package 'docker-ce-rootless-extras' has no installation candidate
E: Unable to locate package docker-compose-plugin
E: Package 'g++-8' has no installation candidate
E: Unable to locate package gcc-8
E: Unable to locate package gcc-8-base:amd64
E: Unable to locate package golang-1.11
E: Couldn't find any package by glob 'golang-1.11'
E: Couldn't find any package by regex 'golang-1.11'
E: Unable to locate package golang-1.11-doc
E: Couldn't find any package by glob 'golang-1.11-doc'
E: Couldn't find any package by regex 'golang-1.11-doc'
E: Unable to locate package golang-1.11-go
E: Couldn't find any package by glob 'golang-1.11-go'
E: Couldn't find any package by regex 'golang-1.11-go'
E: Unable to locate package golang-1.11-src
E: Couldn't find any package by glob 'golang-1.11-src'
E: Couldn't find any package by regex 'golang-1.11-src'
E: Package 'mariadb-client-10.3' has no installation candidate
E: Package 'mariadb-client-core-10.3' has no installation candidate
E: Package 'mariadb-server-10.3' has no installation candidate
E: Package 'mariadb-server-core-10.3' has no installation candidate
E: Unable to locate package netstandard-targeting-pack-2.1
E: Couldn't find any package by glob 'netstandard-targeting-pack-2.1'
E: Couldn't find any package by regex 'netstandard-targeting-pack-2.1'
E: Unable to locate package packages-microsoft-prod
E: Unable to locate package perl-modules-5.28
E: Couldn't find any package by glob 'perl-modules-5.28'
E: Couldn't find any package by regex 'perl-modules-5.28'
E: Unable to locate package php-symfony-debug
E: Package 'php7.4' has no installation candidate
E: Unable to locate package php7.4-bcmath
E: Couldn't find any package by glob 'php7.4-bcmath'
E: Couldn't find any package by regex 'php7.4-bcmath'
E: Unable to locate package php7.4-bz2
E: Couldn't find any package by glob 'php7.4-bz2'
E: Couldn't find any package by regex 'php7.4-bz2'
E: Package 'php7.4-cli' has no installation candidate
E: Package 'php7.4-common' has no installation candidate
E: Unable to locate package php7.4-curl
E: Couldn't find any package by glob 'php7.4-curl'
E: Couldn't find any package by regex 'php7.4-curl'
E: Package 'php7.4-fpm' has no installation candidate
E: Unable to locate package php7.4-gd
E: Couldn't find any package by glob 'php7.4-gd'
E: Couldn't find any package by regex 'php7.4-gd'
E: Unable to locate package php7.4-imagick
E: Couldn't find any package by glob 'php7.4-imagick'
E: Couldn't find any package by regex 'php7.4-imagick'
E: Unable to locate package php7.4-intl
E: Couldn't find any package by glob 'php7.4-intl'
E: Couldn't find any package by regex 'php7.4-intl'
E: Unable to locate package php7.4-json
E: Couldn't find any package by glob 'php7.4-json'
E: Couldn't find any package by regex 'php7.4-json'
E: Unable to locate package php7.4-mbstring
E: Couldn't find any package by glob 'php7.4-mbstring'
E: Couldn't find any package by regex 'php7.4-mbstring'
E: Unable to locate package php7.4-mysql
E: Couldn't find any package by glob 'php7.4-mysql'
E: Couldn't find any package by regex 'php7.4-mysql'
E: Unable to locate package php7.4-opcache
E: Couldn't find any package by glob 'php7.4-opcache'
E: Couldn't find any package by regex 'php7.4-opcache'
E: Unable to locate package php7.4-readline
E: Couldn't find any package by glob 'php7.4-readline'
E: Couldn't find any package by regex 'php7.4-readline'
E: Unable to locate package php7.4-soap
E: Couldn't find any package by glob 'php7.4-soap'
E: Couldn't find any package by regex 'php7.4-soap'
E: Unable to locate package php7.4-sqlite3
E: Couldn't find any package by glob 'php7.4-sqlite3'
E: Couldn't find any package by regex 'php7.4-sqlite3'
E: Unable to locate package php7.4-sqlite3-dbgsym
E: Couldn't find any package by glob 'php7.4-sqlite3-dbgsym'
E: Couldn't find any package by regex 'php7.4-sqlite3-dbgsym'
E: Unable to locate package php7.4-xml
E: Couldn't find any package by glob 'php7.4-xml'
E: Couldn't find any package by regex 'php7.4-xml'
E: Unable to locate package php7.4-xmlrpc
E: Couldn't find any package by glob 'php7.4-xmlrpc'
E: Couldn't find any package by regex 'php7.4-xmlrpc'
E: Unable to locate package php7.4-zip
E: Couldn't find any package by glob 'php7.4-zip'
E: Couldn't find any package by regex 'php7.4-zip'
E: Unable to locate package postgresql-16
E: Unable to locate package postgresql-client-16
E: Package 'python' has no installation candidate
E: Unable to locate package python-meld3
E: Package 'python-minimal' has no installation candidate
E: Package 'python-pkg-resources' has no installation candidate
E: Package 'python2' has no installation candidate
E: Unable to locate package python2-minimal
E: Unable to locate package python2.7
E: Couldn't find any package by glob 'python2.7'
E: Couldn't find any package by regex 'python2.7'
E: Unable to locate package python2.7-minimal
E: Couldn't find any package by glob 'python2.7-minimal'
E: Couldn't find any package by regex 'python2.7-minimal'
E: Package 'python3.7' has no installation candidate
E: Unable to locate package python3.7-minimal
E: Couldn't find any package by glob 'python3.7-minimal'
E: Couldn't find any package by regex 'python3.7-minimal'
E: Unable to locate package webmin

我确切地执行了命令apt-get update,并且apt-get upgrade

精度:这是一台安装了 Debian 12 的新 VPS,该 VPS 位于德国,ping 运行良好。我使用 ssh 发送命令。

这是命令的输出apt-get update

root@vmi1567361:~# apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Get:3 http://deb.debian.org/debian bookworm-proposed-updates InRelease [59.5 kB]
Get:4 http://deb.debian.org/debian bookworm-backports InRelease [56.5 kB]
Get:5 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:6 http://deb.debian.org/debian bookworm-backports/main amd64 Packages.diff/Index [63.3 kB]
Get:7 http://deb.debian.org/debian bookworm-backports/main amd64 Packages T-2023-12-28-0205.20-F-2023-12-28-0205.20.pdiff [296 B]
Get:7 http://deb.debian.org/debian bookworm-backports/main amd64 Packages T-2023-12-28-0205.20-F-2023-12-28-0205.20.pdiff [296 B]
Get:8 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [132 kB]
Get:9 http://deb.debian.org/debian-security bookworm-security/main Translation-en [78.5 kB]
Fetched 490 kB in 1s (413 kB/s)                                  
Reading package lists... Done

有人可以帮忙吗?

答案1

这里失败的是通过 http 进行的简单检索。但是,您没有提供任何证据表明您曾尝试调查该问题。您也没有提供任何有关此机器位于何处、您如何访问它或它如何访问互联网的详细信息。您也没有提供任何有关机器的历史记录和当前的具体任务。您建造了它吗?它以前能用吗?有关 Server Fault 的问题肯定是关于在商业环境中管理信息技术系统的。从您在此处提供的内容来看,我们只能假设(并希望)这里的情况并非如此。

同时,您可能考虑检查主机是否可以解析 DNS 条目。您可以使用以下命令从 shell 执行此host操作,例如:

$ host www.google.com
www.google.com has address 142.250.187.196
www.google.com has IPv6 address 2a00:1450:4009:81f::2004

apt 可能已配置为使用不再接受来自主机的请求的代理:

$ sudo find /etc/apt -type f -exec grep -H -i proxy {} \;

它需要一个 IP 地址和一条路由来连接到目标,显示这些的命令是ip aip route

网关设备必须正在运行并接受您的流量。

您需要确保您的防火墙策略没有阻止访问 -iptables -L 可能展示一些相关的东西。

答案2

书呆子是 Debian 12。所有显示为未找到的软件包都不属于 Debian 12:

  • apt-clone

    Debian 10 或 trixie/sid(未来的 Debian 13),而不是 Debian 12。

  • cpp-8gcc-8

    Debian 10

  • containerd.io,,,,docker-buildx-plugindocker-cedocker-ce-cli

    上游 Docker,不是来自 Debian 12 存储库

  • golang-1.11

    Debian 10

  • ...

    等等等等。

这些软件包都不是 Debian 12 提供的,但 Debian 12 是唯一配置的源。

因此不存在 Debian 系统错误。错误是由于尝试安装不可用的软件包造成的。

我猜这是为了 Debian 10 和上游 Docker 的增强而设计的。

相关内容