如何將軟體來源恢復為預設?

如何將軟體來源恢復為預設?

可能的重複:
如何修復此“E:Type '*' is notknown on line * in source list …”更新錯誤?

我的更新來源遇到了一些問題,我正在運行 Ubuntu Natty Narwhal,我正在修改二進位檔案來安裝一個名為「火羊」的 Firefox 插件,我認為我的更新來源被更​​改了,每次我嘗試更新我收到此錯誤訊息

An unresolvable problem occurred while initializing the package information.

Please report this bug against the 'update-manager' package and include the following error message:

'E:Type 'See' is not known on line 2 in source list /etc/apt/sources.list'

答案1

我不認為這與附加元件有任何關係,但我遇到了類似的問題。不知怎的,你的sources.list在第2行被修改了。

複製您的sources.list,以防萬一您需要恢復變更:

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

使用編輯器開啟文件,例如:

gksu gedit /etc/apt/sources.list

在第二行你會發現問題:那句話:

See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

必須進行註釋,否則更新管理器將嘗試將其作為來源讀取,這就是您所看到的錯誤。

只需在該行前面新增一個 # 即可。我應該是這樣的:

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

如果問題仍然存在,可能是因為您還有其他行出現相同的錯誤,只需將其全部糾正即可。但不要註解所有行,首先嘗試找出哪些行是錯誤的。每次執行 update-manager,如果發生錯誤,它會告訴您該行的位置。

祝你好運!

相關內容