解决Ubuntu "Wrong sources.list entry or malformed file"

Ubuntu 在运行更新命令apt-get update时出现下面错误:

1
W: Failed to fetch http://mirror.sov.uk.goscomb.net/ubuntu/dists/trusty-security/InRelease Unable to find expected entry 'main/binary-i/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://mirror.sov.uk.goscomb.net/ubuntu/dists/trusty-updates/InRelease Unable to find expected entry 'restricted/binary-i/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://mirror.sov.uk.goscomb.net/ubuntu/dists/trusty/Release Unable to find expected entry 'main/binary-i/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

仔细检查了/etc/apt/sources.list以及/etc/apt/sources.list.d/*.list文件都没有找到哪里写了binary-i相关的东西。

后来受这个答案启发,用以下命令解决了问题:

1
sudo dpkg --remove-architecture i

原因估计是不小心执行了dpkg --add-architecture命令把架构i添加到系统了,更新时自然无法找到相关的源