Xenial 无法在任何软件包安装上获取...404

Mer*_*erk 4 package-management apt 16.04

如果我使用,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]
Run Code Online (Sandbox Code Playgroud)

当我安装任何其他软件包时会抛出类似的错误。

我一直在更改我的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
Run Code Online (Sandbox Code Playgroud)

的输出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.
Run Code Online (Sandbox Code Playgroud)

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

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

我将不胜感激任何建议

mur*_*uru 5

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]
Run Code Online (Sandbox Code Playgroud)

由于这些错误,没有加载此存储库中的包列表。因此,本来可以使用的 armhf 软件包就没有了。

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

sudo dpkg --remove-architecture i386
sudo apt update
Run Code Online (Sandbox Code Playgroud)

ports.ubuntu.com软件包列表现在应该在下载/var/lib/apt/lists/和数据包应该可用。