我该如何修复此问题?

我该如何修复此问题?
ryan@Ryans-Gaming-Pc:~$ sudo apt-get update
[sudo] password for ryan: 
N: Ignoring file 'mono-xamarin.listclear' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: Type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/mono-xamarin.list
E: The list of sources could not be read.
ryan@Ryans-Gaming-Pc:~$ 

我想进行更新,最近我尝试查看是否可以安装 Microsoft silver-light 来观看 Netflix,但当我尝试安装 moonlight 时,它冻结了,什么也没做,现在它认为 sudo 不在源列表中。请帮忙,谢谢您的时间。

答案1

正如错误消息所告诉您的那样,您的源列表中存在问题。

通过在终端中输入mono-xamarin.listclear来删除 如果您认为此文件有用,您可以将其删除到另一个目录中。/etc/apt/sources.list.d/sudo rm /etc/apt/sources.list.d/mono-xamarin.listclearsudo mv

接下来编辑/etc/apt/sources.list.d/mono-xamarin.list以删除它抱怨的错误。 sudo不应该在这个文件中。如果您不知道为什么这个文件在您的源目录中,请删除它或将其移动到其他地方。如果您知道它需要在那里,请编辑您的问题(不要以评论或答案的形式发布)并显示此文件的内容,我会帮助您编辑它。

相关内容