今天下午被一个update的问题,让我找了半天的解决方法。 sudo apt-get update 莫名奇妙地出现了这个错误
W: Failed to fetch http://mirrors.ustc.edu.cn/ubuntu/dists/trusty/Release Unable to find expected entry 'main/binary-i386sudo/Packages' in Release file (Wrong sources.list entry or malformed file)
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1328186)上面发现了解决办法:找了半天都没有找到有遇到过这种类似问题的人,google了半天,最后想想,其实binary-i386sudo特别奇葩,显然是哪个地方输错了,我一直觉得是哪个地方莫名奇妙多了entry,然后又开始准备看下apt-get update 的原理。庆幸让我发现了一个类似的奇葩binary-i38,某个人竟然遇到了这种类似的错误。再google一下 binary-i38 类似的问题。在这个帖子https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1328186)
他的错误是:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/utopic-security/Release Unable to find expected entry 'main/binary-i38/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/utopic/Release Unable to find expected entry 'universe/binary-i38/Packages' in Release file (Wrong sources.list entry or malformed file)
解决办法:
On my system helps this:
> dpkg --print-foreign-architectures
it returns:
> i386
> i38
then delete wrong "i38" architecture:
> dpkg --remove-architecture i38
找出机器中有的architectures,发现多了一个i386sudo,它的是i38。然后删除这个架构就好了。
其实就是莫名奇妙添加错了架构。认真思考,从问题中发现诡异之处。然后就能够找到解决办法了。