apt-get update 由于某种原因失败

apt-get update 由于某种原因失败

当我运行此命令时sudo apt-get update出现错误:

jan@janOS:~$ sudo apt-get update
E: Type 'ain' is not known on line 3 in source list /etc/apt/sources.list.d/gwendal-lebihan-dev-cinnamon-stable-precise.list
E: The list of sources could not be read.

我尝试安装 nemo。添加 ppa 后,出现了这种情况。我甚至无法清除它。我该如何修复?出于某种原因,软件中心也不想再打开了。

当我检查更新时,还有一件事。我得到了这个。 在此处输入图片描述

答案1

sudo sed -i 's/ ain/ main/g' /etc/apt/sources.list.d/gwendal-lebihan-dev-cinnamon-stable-precise.list; sudo apt-get update

我假设脚本中有一个拼写错误,将 main 写成了 ain。上面的代码将用“main”替换所有“ain”实例并进行更新。

相关内容