E: 无法下载 http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-armhf/Packages 404 Not Found

~$ sudo apt-get update
命中:1 http://deb.odroid.in/5422-s xenial InRelease
命中:2 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
命中:3 http://packages.ros.org/ros/ubuntu xenial InRelease
获取:4 http://cn.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
获取:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
命中:8 http://mirrors.ustc.edu.cn/ubuntu-ports xenial InRelease
命中:9 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-updates InRelease
命中:10 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-backports InRelease
命中:11 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security InRelease
获取:12 http://cn.archive.ubuntu.com/ubuntu xenial/main Sources [868 kB]
获取:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
获取:13 http://cn.archive.ubuntu.com/ubuntu xenial/universe Sources [7,728 kB]
获取:14 http://cn.archive.ubuntu.com/ubuntu xenial/restricted Sources [4,808 B]
获取:15 http://cn.archive.ubuntu.com/ubuntu xenial/multiverse Sources [179 kB]
获取:7 http://us.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
忽略:16 http://cn.archive.ubuntu.com/ubuntu xenial/main armhf Packages
获取:17 http://cn.archive.ubuntu.com/ubuntu xenial/main Translation-zh_CN [74.8 kB]
获取:18 http://cn.archive.ubuntu.com/ubuntu xenial/main Translation-en [568 kB]
忽略:19 http://cn.archive.ubuntu.com/ubuntu xenial/universe armhf Packages
获取:20 http://cn.archive.ubuntu.com/ubuntu xenial/universe Translation-zh_CN [172 kB]
获取:21 http://us.archive.ubuntu.com/ubuntu xenial-updates/main Sources [339 kB]
获取:22 http://cn.archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]
获取:23 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe Sources [260 kB]
忽略:24 http://cn.archive.ubuntu.com/ubuntu xenial/restricted armhf Packages
获取:25 http://us.archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2,536 B]
获取:26 http://cn.archive.ubuntu.com/ubu

### 获取 Ubuntu Xenial Updates 存储库的 InRelease 文件 在 Ubuntu 系统中,`InRelease` 文件是一个用于验证软件包存储库完整性和真实性的文件。它通常位于存储库的根目录下,并与 GPG 密钥结合使用以确保下载的安全性。对于 Xenial(16.04 LTS)版本,`xenial-updates` 存储库的 `InRelease` 文件可以通过以下方法获取。 #### 方法一:通过浏览器直接访问 可以直接通过浏览器访问 Xenial Updates 存储库的 URL 来下载 `InRelease` 文件。以下是具体路径: ``` http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease ``` 将上述链接粘贴到浏览器地址栏即可下载文件[^1]。 #### 方法二:通过命令行工具 wget 下载 如果需要通过命令行下载 `InRelease` 文件,可以使用 `wget` 工具执行以下命令: ```bash wget http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease ``` 此命令会将 `InRelease` 文件保存到当前工作目录下。 #### 方法三:手动配置并更新存储库 如果用户希望直接从系统中获取 `InRelease` 文件,可以通过以下步骤实现: 1. 确保 `/etc/apt/sources.list` 文件中包含正确的 Xenial Updates 存储库条目: ```plaintext deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse ``` 2. 使用以下命令更新存储库索引: ```bash sudo apt-get update ``` 3. 更新完成后,`InRelease` 文件会被下载到本地缓存目录 `/var/lib/apt/lists/` 中。可以通过以下命令查看文件内容: ```bash cat /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_xenial-updates_InRelease ``` #### 方法四:解决 DNS 解析问题 如果在执行 `apt-get update` 时遇到 DNS 解析错误(如 `Temporary failure resolving 'archive.ubuntu.com'`),可以尝试以下解决方案: 1. 停止并重新启动 NetworkManager 服务: ```bash sudo service network-manager stop sudo rm /var/lib/NetworkManager/NetworkManager.state sudo service network-manager start ``` 2. 修改 `/etc/resolv.conf` 文件,添加可靠的 DNS 服务器(例如 Google 的公共 DNS): ```plaintext nameserver 8.8.8.8 nameserver 8.8.4.4 ``` 完成上述操作后,再次运行 `sudo apt-get update`,应能正常下载 `InRelease` 文件[^3]。 #### 示例代码:验证 InRelease 文件签名 为了验证下载的 `InRelease` 文件是否可信,可以使用以下命令: ```bash gpg --keyserver keyserver.ubuntu.com --recv-keys <KEY_ID> gpg --verify xenial-updates-InRelease ``` 其中 `<KEY_ID>` 是 Ubuntu 官方 GPG 密钥的 ID,可以从 `InRelease` 文件中提取。 --- ###
评论 4
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值