我无法更新,Ubuntu 12.04

我无法更新,Ubuntu 12.04
W:Ignoring file 'rohan' in directory '/etc/apt/sources.list.d/' as it has no filename extension
W:Ignoring file 'Untitled Document 1' in directory '/etc/apt/sources.list.d/' as it has no filename extension
E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list

答案1

看来您不小心弄乱了/etc/apt/sources.list.d目录。

不知何故,在此目录中创建了一个名为 的文件rohan,一个名为 的文件,并且该文件已损坏。Untitled Document 1ubuntu-wine-ppa-precise.list

尝试删除这些文件/etc/apt/sources.list.d/rohan/etc/apt/sources.list.d/Untitled Document 1或者将它们移动到~/您的主目录 - 如果您不确定它们是否包含与您相关的数据)。

编辑文件/etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list并更改ainmain第一行(很可能是第一行的最后一个单词)。

答案2

您可以忽略前两行,或者纠正问题

  1. rohan删除其中的文件/etc/apt/sources.list.d/

    sudo rm /etc/apt/sources.list.d/rohan
    
  2. Untitled Document 1删除其中的文件/etc/apt/sources.list.d/

    sudo rm "/etc/apt/sources.list.d/Untitled Document 1"
    

更正文件/etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list

  • 更正文件/etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list

    sudo nano /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
    

    并将内容替换为以下行

    deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main 
    # deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main 
    

相关内容