ubutnu更换国内源后,更新一直出现404,Not Found的问题

1.问题

题主系统是ubuntu16.04,64位系统,尝试更换国内各种源,连ubuntu官方源都尝试了.

sudo vim /etc/apt/sources.list修改为:

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

sudo apt update 后,一直出现Not Found的问题,类似如下:
Reading package lists... Done
E: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial/main/binary-arm64/Packages  404  Not Found
E: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-updates/main/binary-arm64/Packages  404  Not Found
E: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-backports/main/binary-arm64/Packages  404  Not Found
E: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-security/main/binary-arm64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

最后发现是因为安装nvidia driverworks SDK导致apt混乱,apt更新总是寻找ARM架构,导致出现这个问题.

2.解决办法

指定更新的架构,添加[arch=amd64](32位的可以换成[arch=i396])

更换后如下:

deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
再使用sudo apt update后显示成功:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
191 packages can be upgraded. Run 'apt list --upgradable' to see them.

参考网址:https://askubuntu.com/questions/996103/16-04-update-packages-not-found

你可能感兴趣的:(ubutnu更换国内源后,更新一直出现404,Not Found的问题)