无法打开“ubuntu 软件中心”、“软件更新程序”、“软件源”、“语言支持”源列表中的第 56 行格式错误

无法打开“ubuntu 软件中心”、“软件更新程序”、“软件源”、“语言支持”源列表中的第 56 行格式错误

我收到以下错误:

无法初始化包信息

初始化包信息时出现无法解决的问题。

请报告针对“update-manager”软件包的这个错误,并包含以下错误消息:E:源列表 /etc/apt/sources.list(URI 解析)中的第 56 行格式错误、E:无法读取源列表、E:无法解析或打开软件包列表或状态文件。

我知道问题在于源列表中的第 56 行但我做了“如何从我的 sources.list 中删除格式错误的行?“因为它是我第一个问题的‘[重复]’,但即使提出了每个解决方案,问题仍然存在,我还能做什么?

当我在终端中输入时,gksu gedit /etc/apt/sources.list我得到:

# deb cdrom:[Ubuntu 12.10 _Quantal Quetzal_ - Release i386 (20121017.2)]/ quantal main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mx.archive.ubuntu.com/ubuntu/ quantal main restricted
deb-src http://mx.archive.ubuntu.com/ubuntu/ quantal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mx.archive.ubuntu.com/ubuntu/ quantal-updates main restricted
deb-src http://mx.archive.ubuntu.com/ubuntu/ quantal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mx.archive.ubuntu.com/ubuntu/ quantal universe
deb-src http://mx.archive.ubuntu.com/ubuntu/ quantal universe
deb http://mx.archive.ubuntu.com/ubuntu/ quantal-updates universe
deb-src http://mx.archive.ubuntu.com/ubuntu/ quantal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mx.archive.ubuntu.com/ubuntu/ quantal multiverse
deb-src http://mx.archive.ubuntu.com/ubuntu/ quantal multiverse
deb http://mx.archive.ubuntu.com/ubuntu/ quantal-updates multiverse
deb-src http://mx.archive.ubuntu.com/ubuntu/ quantal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mx.archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://mx.archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu quantal-security main restricted
deb-src http://security.ubuntu.com/ubuntu quantal-security main restricted
deb http://security.ubuntu.com/ubuntu quantal-security universe
deb-src http://security.ubuntu.com/ubuntu quantal-security universe
deb http://security.ubuntu.com/ubuntu quantal-security multiverse
deb-src http://security.ubuntu.com/ubuntu quantal-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu quantal partner
# deb-src http://archive.canonical.com/ubuntu quantal partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu quantal main
deb-src socio http://archive.canonical.com/ precisa
deb-src http://extras.ubuntu.com/ubuntu quantal main

显然,我必须说我对此还很陌生,所以我将感谢您的帮助。

感谢 -伊莱亚·卡根- 教我如何把'来源列表“这正是我最初想做的事,但我不知道该怎么做,非常感谢。

答案1

消除最后一行之前的内容:

deb-src socio http://archive.canonical.com/ precisa

似乎您手动编辑了它并犯了错误。此行没有指示任何具体内容(mainpartner等),所以我不知道此行应该是什么。

删除并保存文件后,更新软件包源,例如sudo apt-get update,或单击查看在系统更新管理器中。

顺便说一句,我不明白更广泛的如何从我的 sources.list 中删除格式错误的行?问题没有涵盖这一点。

相关内容