问题
COULD NOT INTITIALIZE THE PACKAGE INFORMATION
An unresolvable problem occured while initializing the package information
Please report t:his bug against the 'update-manager' package and include the
following error message:
'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)
E: The list of sources could not be read.,
E: The package list of status file could not be parsed or opened.
答案1
要执行此操作,请运行以下命令(按Ctrl+Alt+T打开终端):
sudo -H gedit /etc/apt/sources.list
如有必要,用另一个文件名替换/etc/apt/sources.list
。
查找格式不正确的行(参考错误的行号),以下是正确格式化行的示例:
# Comment, marked by a line starting with '#'
deb http://site.example.com/debian distribution component1 component2 component3
deb-src http://site.example.com/debian distribution component1 component2 component3
保存文件,并退出文本编辑器,然后,在终端窗口中运行此命令:
sudo apt-get update
假设没有错误,问题就解决了,你应该能够运行软件中心。
答案2
快速方法
这个问题的解决方法是从头构建sources.list
条目。
deb http://archive.ubuntu.com/ubuntu precise main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu precise universe main multiverse restricted
deb http://security.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-updates universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-backports universe main multiverse restricted
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
# deb http://extras.ubuntu.com/ubuntu precise main
# deb-src http://extras.ubuntu.com/ubuntu precise main
复制上面的内容,并用root权限打开sources.list
文件。
sudo -H gedit /etc/apt/sources.list
这在终端和按回车键将做这项工作。
然后保存,并关闭gedit。
然后执行sudo apt-get update
,你将看到存储库列表已更新。
推荐的方法
sources.list
文件相关文章