linux - 为什么 aptitude update 会出现 source.list 错误?

标签 linux debian admin aptitude

我正在运行一个 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/

相关文章:

ssl - 如何“正确”修复树莓派上的 SSL 证书?

c# - 如何删除 C# 中的 "Run as Administrator"要求

javascript - 如何使用远程服务器上的浏览器进行自动化测试

Linux,将 apt-get update 和 apt-get upgrade 组合在一起

linux - 将历史从某一行兑换到另一行

php - 尝试为管理员/用户 PHP 创建登录名

php - 配置文件的权限错误,不应该是全局可写的

linux - 在 Bash 管道中分块读取标准输入

linux - 从文件中提取文本并将内容附加到 unix 中每行的末尾

linux - 如何在 Debian 8 上安装 Mono 4.0.1?