APT 命令失败。无法 apt update 和 apt-get install 软件包

APT 命令失败。无法 apt update 和 apt-get install 软件包

继续Ubuntu 22.04.1 LTS jammy前进 继续前进aarch64

我的etc/apt/sources.list样子https://pastebin.com/MDYEWzmi 在我无法安装几个 Canvas 包并修改了 sources.list 文件后,问题就开始了,从那时起,我尝试了许多不同版本的文件来解决此问题,但都失败了。

我运行时的输出sudo apt update

Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 http://eu-paris-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
## MORE LINES ##
Err:55 http://eu-paris-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy-updates/main armhf Packages
  404  Not Found [IP: 91.189.91.122 80]
Err:73 http://eu-paris-1-ad-1.clouds.archive.ubuntu.com/ubuntu jammy-backports/main armhf Packages
  404  Not Found [IP: 91.189.91.122 80]
Fetched 607 kB in 5s (126 kB/s)
Reading package lists... Done
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/main/binary-arm64/Packages  404  Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://eu-paris-1-ad-1.clouds.archive.ubuntu.com/ubuntu/dists/jammy/main/binary-arm64/Packages  404  Not Found [IP: 91.189.91.122 80]E: Failed to fetch http://eu-paris-1-ad-1.clouds.archive.ubuntu.com/ubuntu/dists/jammy-updates/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.122 80]
E: Failed to fetch http://eu-paris-1-ad-1.clouds.archive.ubuntu.com/ubuntu/dists/jammy-backports/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.122 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

完整版,因为 askubuntu 将完整版标记为垃圾邮件https://pastebin.com/EjmTzLy8

我运行时的输出sudo apt-get install <package>

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package autoconf is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'autoconf' has no installation candidate

我运行时的输出sudo apt upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
#
# News about significant security updates, features and services will
# appear here to raise awareness and perhaps tease /r/Linux ;)
# Use 'pro config set apt_news=false' to hide this and future APT news.
#
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

网络:我正在使用 Oracle 云实例,在问题出现之前没有对防火墙进行任何更改,我可以 ping [91.189.91.122],尽管它显示 404 Not Found,我运行测试以查看网络是否仍然通过运行命令wget http://eu-paris-1-ad-1.clouds.archive.ubuntu.com/ubuntu/pool/main/a/autoconf/autoconf_2.71.orig.tar.gz,文件已成功下载

答案1

如果你检查下面的 URLhttp://security.ubuntu.com/ubuntu/dists/jammy-security/main/您还没有binary-arm64/Packages列出。

其他 URL 也一样http://eu-paris-1-ad-1.clouds.archive.ubuntu.com/ubuntu/dists/jammy/main/和反向移植。

因此请修复这些源 URL。

您不必担心 apt-new 和 esm-cache,可以在这里找到更多信息:“apt-news”和“esm-cache”服务是什么,如何禁用它们?

也许您应该修复您的源,因为 autoconf 是主要的一部分,如果您的源列表无法​​获取主要包元数据,请尝试更改为另一个镜像。

相关内容