我正在更新我的 ubuntu 12.04,遇到了一些问题。我认为有些东西坏了,必须修复。请帮助我修复运行更新命令时出现的问题。我收到以下错误。
W: There is no public key available for the following key IDs:
1397BC53640DB551
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/restricted/source/Sources Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案1
Google 放弃了对 i386 的支持,这就是出现此错误的原因。我假设您是 64 位 Ubuntu 用户,您会注意到您在问题中已经提到的错误。
为了修复,必须专门将存储库设置为仅 64 位。为此,请使用便捷的sed
单行命令,而无需手动修改文件:
sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-chrome.list"
对于缺少公钥的问题,你可以尝试将其添加回来:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1397BC53640DB551