14.04如何删除"/etc/apt/sources.list. d 文件中的忽略文件?

分享于 

4分钟阅读

ubuntu

  繁體

问题

由于将13.10升级到14.04,我每次安装,更新,升级等时都会收到这些烦人的消息:


N: Ignoring file 'webupd8team-java-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension 


N: Ignoring file 'bumblebee-stable-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension 


N: Ignoring file 'steam.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


N: Ignoring file 'ubuntu-x-swat-x-updates-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


N: Ignoring file 'xorg-edgers-ppa-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


N: Ignoring file 'webupd8team-java-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


N: Ignoring file 'bumblebee-stable-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


N: Ignoring file 'steam.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


N: Ignoring file 'ubuntu-x-swat-x-updates-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


N: Ignoring file 'xorg-edgers-ppa-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension




W: GPG error: http://www.duinsoft.nl debs Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E18CE6625CB26B26


W: Failed to fetch http://ppa.launchpad.net/person/ppa/ubuntu/dists/karmic/main/binary-amd64/Packages 404 Not Found



W: Failed to fetch http://ppa.launchpad.net/person/ppa/ubuntu/dists/karmic/main/binary-i386/Packages 404 Not Found



E: Some index files failed to download. They have been ignored, or old ones used instead.




答案1

要修复第一个问题,请在终端中运行:


sudo rm /etc/apt/sources.list.d/*.disable



在禁用PPA时,软件包管理工具的旧版本保留了这些文件。移除它们相当安全)

你的第二个问题来自旧Karmic存储库,要找出在终端中运行这个命令,请执行以下操作:


cd /etc/apt



grep -rw karmic *



一旦知道它来自哪个存储库,就很容易禁用/删除它。


答案2

也许你应该尝试以下命令:


sudo sh -c"echo 'Dir::Ignore-Files-Silently::"(.save|.distupgrade)$";' > /etc/apt/apt.conf.d/99ignoresave"




答案3

我在Ubuntu MATE 15.04中也有类似的问题。


sudo sh -c"echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"




wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -




sudo apt-get update



我收到了这条消息:


N: Ignoring file 'pgdg.listwget' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension



我用这种方法解决了:


sudo mv /etc/apt/sources.list.d/pgdg.listwget /etc/apt/sources.list.d/pgdg.list





文件  ext  lis  DIR  列表  
相关文章