错误:解析文件‘/var/lib/dpkg/status’第 55497 行附近软件包‘indicator-displex’

错误:解析文件‘/var/lib/dpkg/status’第 55497 行附近软件包‘indicator-displex’

从 Ubuntu 11.10(Oneiric Ocelot)升级到 12.04LTS(Precise Pangolin)后,弹出一个窗口,提示升级失败,我应该运行sudo dpkg --configure -a

运行该命令得到以下结果:

sudo dpkg --configure -a
dpkg: error: parsing file '/var/lib/dpkg/status' near line 55497 package 'indicator-displex':
 blank line in value of field 'Description

尝试运行apt-get install -f会出现许多依赖性错误以及相同的 dpkg 错误。

答案1

查看第 55497 行错误中提到的文件后/var/lib/dpkg/status,我看到了以下内容:

Package: indicator-displex
Priority: optional
Section: GTK, system, admin
Installed-Size: 1524
Maintainer: Arick McNiel <arickmcniel AT yahoo DOT com>
Architecture: all
Version: 0.1
Depends: python, python-gtk2, python-central (>= 0.6.1), python-notify, python-appindicator, compiz
Size: 130748
Description: DisPlex
 AppIndicator to interface with Compiz / Xrandr / Emerald.
 .
 The Displex (indicator-displex) application provides an AppIndicator to the display
 interfaces of Compiz / Emerald / and Gnome Display Manager.  In doing so, it hopes
 to provide a product that is helpful for those applications without an AppIndicator
 interface AND to minimize icons by combinine some functionality of the
 gnome-display-manger AppIndicator icon.

 DisPlex has the following features:
 -Uses the new Ubuntu AppIndicator interface
 -Provides interface for: COMPIZ, EMERALD, GNOME Display Properties
 -Enables you to change decorators from the AppIndicator Tray
 -Enables you to activate / deactivate Compiz Effects
 -Enables you to switch window manager
 -Provides the ability to hide/show desktop icons
Homepage: https://launchpad.net/displex; http://sourceforge.net/projects/displex/

我备份了该文件,然后在文本编辑器中打开它。(sudo vi /var/lib/dpkg/status,然后:55497转到该行。)

.在“DisPlex 具有以下功能:”之前的空白行中添加一个单数解决了该问题。

(如果不熟悉 vi...这里有一个提示:A添加行,添加空格和句点ESC以退出插入模式,然后:wq写入并退出)

然后我就可以运行了sudo dpkg --configure -a。运行后sudo apt-get -f install,我看到文件有类似的错误。我在错误中提到的行上向此文件/var/lib/dpkg/available添加了一个,现在它基本上可以正常工作了。.

我遇到了最后一个问题,和这个一样漏洞

Unpacking libatk-adaptor-schemas (from .../libatk-adaptor-schemas_2.4.0-1ubuntu2_amd64.deb) ...
 dpkg: error processing /var/cache/apt/archives/libatk-adaptor-schemas_2.4.0-1ubuntu2_amd64.deb (--unpack):
  trying to overwrite '/usr/share/glib-2.0/schemas/org.a11y.atspi.gschema.xml', which is also in package libatk-adaptor 2.2.1-0ubuntu1
ErrorMessage: trying to overwrite '/usr/share/glib-2.0/schemas/org.a11y.atspi.gschema.xml', which is also in package libatk-adaptor 2.2.1-0ubuntu1

要修复此问题:

sudo apt-get update
sudo apt-get dist-upgrade

答案2

您也可以尝试运行:

sudo fuser -vki /var/lib/dpkg/lock
sudo dpkg --configure -a

这对我来说很管用。它杀死了锁定 dpkg 的进程。

(另见https://bugs.kde.org/show_bug.cgi?id=284962

答案3

我也遇到了同样的问题。运行以下命令可修复此问题:

sudo dpkg --remove libatk*
sudo apt-get -f install

来自启动板错误报告:

启动板上的错误报告

相关内容