解决 Failed to fetch http://172.6.0.2/ubuntu/dists/jammy/main/binary-i386/Packages 404 Not Found问题

关于局域网内Ubuntu客户端使用apt从局域网内Ubuntu镜像服务器拉取软件失败的问题。

将Ubuntu客户端上/etc/apt/source.list中的链接改为局域网内镜像服务器的IP地址,但是在更新时系统报错。

使用apt-mirror在局域网中配置了一台Ubuntu镜像服务器供局域网内其他设备使用,但是发现在Ubuntu终端上输入

sudo apt-get update

后,终端提示如下错误

 E: Failed to fetch http://172.6.0.2/ubuntu/dists/jammy/main/binary-i386/Packages  404  Not Found [IP: 172.6.0.2 80]
E: Failed to fetch http://172.6.0.2/ubuntu/dists/jammy-updates/main/binary-i386/Packages  404  Not Found [IP: 172.6.0.2 80]
E: Failed to fetch http://172.6.0.2/ubuntu/dists/jammy-backports/universe/binary-i386/Packages  404  Not Found [IP: 172.6.0.2 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

 简单翻译一下可以知道,上面错误是在更新i386架构的包时出的错误,所以采用如下方法解决

1、查看系统支持的其他架构

dpkg --print-foreign-architectures

输入上面指令后会看到终端回显

i386 

说明系统还支持其他i386架构,所以对其进行移除操作

2、移除i386架构

终端输入

dpkg --remove-architecture i386

在移除过程中,终端回显

dpkg: error: cannot remove architecture 'i386' currently in use by the database 

 这是因为有些软件是i386的,所以需要先移除i386架构的软件,然后再移除i386架构

apt-get remove .*:i386
dpkg --remove-architecture i386

如果移除过程仍然失败,可以尝试在指令前加sudo,使用超级用户去操作

sudo apt-get remove .*:i386
sudo dpkg --remove-architecture i386

3、移除后再尝试更新

以上操作完成后尝试进行更新,在终端输入

 sudo apt-get update

现在可以发现终端没有再报错,终端输入

sudo apt-get install hping3 iperf

可以发现Ubuntu已经能够正常从局域网内配置的镜像服务器上下载安装软件。

  • 4
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值