过去几天我无法成功运行 sudo apt-get update。
从终端运行时sudo apt-get update
,显示错误,
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/wily/InRelease Unable to find expected entry 'main/binary-i386cddcd/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/wily-updates/InRelease Unable to find expected entry 'main/binary-i386cddcd/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/wily-security/InRelease Unable to find expected entry 'main/binary-i386cddcd/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/wily/InRelease Unable to find expected entry 'partner/binary-i386cddcd/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://archive.canonical.com/dists/wily/InRelease Unable to find expected entry 'partner/binary-i386cddcd/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.
使用软件更新程序 GUI 进行更新时,显示以下消息:
Failed to download repository information
Check your Internet connection
似乎某些条目/配置已损坏。我尝试更改
软件与更新
通过启用/禁用受限的多元宇宙选项Ubuntu 软件选项卡以及 Canonical Partners 选项其他软件标签。
有什么办法可以重置/清理这个存储库源列表吗?
我本来可以重新安装 Ubuntu,但我懒得重新安装和配置所有软件和其他东西。提前致谢。
答案1
尝试sudo -E apt-get update
。
由于某种原因,这是必需的。
而且软件中心无法工作,因为我不知道如何打开sudo -E
启用的软件中心......
答案2
在终端上尝试删除所有
cd /var/lib/dpkg/updates
sudo rm *
然后运行以下命令来获取更新的版本,
sudo apt-get update
答案3
尝试添加:
[arch=amd64]
在 deb 之后,但在 URL 之前/etc/apt/sources.list
答案4
尝试:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
然后:
sudo apt-get update
如果有效:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null