用了Ubuntu好几年了,好的软件源也很多,经常要添加自己喜欢的源,但是常见以下错误:
Failed to fetch .. Unable to find expected entry .. in Meta-index file (malformed Release file?)
或者: W:Failed to fetch Unable to find expected entry '...' 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.
比如,用 virtualbox的源的时候:
W: Failed to fetch http://download.virtualbox.org/virtualbox/debian/dists/maverick/Release Unable to find expected entry non-free/source/Sources in Meta-index file (malformed Release file?)
W:Failed to fetch http://download.virtualbox.org/virtualbox/debian/dists/oneiric/Release Unable to find expected entry 'contrib/source/Sources' 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.
用meego-sdk的源的时候:
W: 无法下载 http://repo.meego.com/MeeGo/sdk/host/repos/ubuntu/10.10/Release Unable to find expected entry Sources in Meta-index file (malformed Release file?)
E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。
解决办法:
说明:这种问题一般是通过软件源添加源的时候出现的,直接命令行修改如:
sudo vi /etc/apt/sources.list
的时候出现较少。因为 软件源会自动添加 你设置的源的源代码的源(也就是会自动多这一行deb-src),这也就是问题所在,很多自己添加的源并没有源代码的,只有发行包。
所以注释掉相应的行就可以了。
比如:
sudo vi /etc/apt/sources.list
deb http://download.virtualbox.org/virtualbox/debian maverick non-free
#deb-src http://download.virtualbox.org/virtualbox/debian maverick non-free
注释掉后面那一行,再更新和下载自己需要的软件就可以了!!!
图示补充:
1、手动添加软件前的 其他软件源列表:
2、手动添加源地址:
3、该工具额外添加了一行 源代码的源的信息,如图鼠标所示,取消含有(源代码)的那一行,然后重新更新软件列表就可以了。
评论