为什么aptitude update会给我一个source.list错误?

时间:2015-07-08 08:45:49

标签: linux debian admin aptitude

我正在运行一个debian(wheezy)Web服务器,而且我正在安装更新程序。对于该任务,我使用aptitude update,然后使用aptitude safe-upgrade。每次我执行此过程时,我都会收到此输出,其中包含底部的错误消息:

Hit http://ftp.de.debian.org wheezy Release.gpg                                      
Hit http://ftp.de.debian.org wheezy-updates Release.gpg      
Hit http://ftp.de.debian.org wheezy Release
Hit http://ftp.de.debian.org wheezy-updates Release          
Hit http://ftp.de.debian.org wheezy/main Sources             
Hit http://ftp.de.debian.org wheezy/contrib Sources          
Hit http://ftp.de.debian.org wheezy/non-free Sources                           
Hit http://ftp.de.debian.org wheezy/main amd64 Packages                        
Hit http://ftp.de.debian.org wheezy/contrib amd64 Packages                     
Hit http://ftp.de.debian.org wheezy/non-free amd64 Packages                    
Hit http://ftp.de.debian.org wheezy/contrib Translation-en                     
Hit http://security.debian.org wheezy/updates Release.gpg        
Hit http://ftp.de.debian.org wheezy/main Translation-en
Hit http://security.debian.org wheezy/updates Release
Hit http://security.debian.org wheezy/updates/main Sources
Hit http://ftp.de.debian.org wheezy/main Translation-de_DE
Hit http://security.debian.org wheezy/updates/contrib Sources    
Hit http://security.debian.org wheezy/updates/non-free Sources   
Hit http://ftp.de.debian.org wheezy/main Translation-de          
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://security.debian.org wheezy/updates/contrib amd64 Packages
Hit http://ftp.de.debian.org wheezy/non-free Translation-en      
Hit http://security.debian.org wheezy/updates/non-free amd64 Packages
Hit http://security.debian.org wheezy/updates/contrib Translation-en
Get: 1 http://ftp.de.debian.org wheezy-updates/main Sources [3,855 B]
Hit http://security.debian.org wheezy/updates/main Translation-en           
Hit http://security.debian.org wheezy/updates/non-free Translation-en
Get: 2 http://ftp.de.debian.org wheezy-updates/contrib Sources [14 B]
Fetched 3,869 B in 4s (798 B/s)
W: Failed to fetch http://ftp.de.debian.org/debian/dists/wheezy-updates/Release: Unable to find expected entry 'non/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.
E: Couldn't rebuild package cache

所以我查看了我的源列表,发现此条目导致了问题:

(这只是我的源列表中的一行)

deb-src http://ftp.de.debian.org/debian/ wheezy-updates main contrib non free

如何更改条目以使其正常工作?这里有安全问题吗?我很欣赏该主题的任何提示和信息。

提前谢谢! : - )

1 个答案:

答案 0 :(得分:1)

我找到了解决方案。我必须更正source.list行

deb-src http://ftp.de.debian.org/debian/ wheezy-updates main contrib non free

deb-src http://ftp.de.debian.org/debian/ wheezy-updates main contrib non-free

非自由之间缺少“ - ”。现在我可以在没有错误的情况下解雇aptitude update。如果你仍然有关于这个主题的任何提示或信息,我很高兴阅读它,source.list文件对我来说是一个神秘的。