Xenial 无法获取...任何软件包安装时出现 404

Xenial 无法获取...任何软件包安装时出现 404

如果我使用apt-get install git我会收到以下错误:

Err:1 http://ports.ubuntu.com/ubuntu-ports xenial-security/main armhf git- man all 1:2.7.4-0ubuntu1.3 404  Not Found [IP: 91.189.88.150 80]

Err:2 http://ports.ubuntu.com/ubuntu-ports xenial-security/main armhf git armhf 1:2.7.4-0ubuntu1.3 404  Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/git/git-man_2.7.4-0ubuntu1.3_all.deb  404  Not Found [IP: 91.189.88.150 80]

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/git/git_2.7.4-0ubuntu1.3_armhf.deb  404  Not Found [IP: 91.189.88.150 80]

当我安装任何其他包时也会引发类似的错误。

我一直在更改我的sources.list文件,但似乎没有任何帮助。

sources.list以下是我的文件的内容:

deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ xenial main
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse

输出apt-get update

N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'https://dl.winehq.org/wine-builds/ubuntu xenial InRelease' doesn't support architecture 'armhf'
E: Failed to fetch http://ports.ubuntu.com/ubuntu ports/dists/xenial/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-updates/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-security/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

有趣的是,当我从浏览器访问 91.189.88.150 时,它会转到默认的 apache 服务器测试页面。

我的 sources.list.d 目录似乎是空的。

我将非常感激任何建议

答案1

Ubuntu 端口存储库不包含任何 x86 软件包,这就是您看到这些错误的原因:

E: Failed to fetch http://ports.ubuntu.com/ubuntu ports/dists/xenial/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-updates/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/xenial-security/main/binary-i386/Packages  404  Not Found [IP: 91.189.88.150 80]

由于这些错误,无法加载此存储库中的软件包列表。因此,原本可用的 armhf 软件包不可用。

由于您似乎没有使用 i386 存储库,只需将其删除,然后apt-get update再次运行:

sudo dpkg --remove-architecture i386
sudo apt update

ports.ubuntu.com现在应该可以在 中下载软件包列表,/var/lib/apt/lists/并且软件包应该可用。

相关内容