我正在运行一个 debian(喘息)网络服务器,并且我正在定期安装更新。对于该任务,我使用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
如何更改条目以使其正常工作?这里有安全问题吗?我很欣赏有关该主题的任何提示和信息。
提前谢谢您! :-)
最佳答案
我找到了解决这个问题的方法。我必须更正 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 文件对我来说有点神秘。
关于linux - 为什么 aptitude update 会出现 source.list 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31287693/