软件中心 - 在软件包目录修复之前无法安装或删除项目”

软件中心 - 在软件包目录修复之前无法安装或删除项目”

我尝试按时安装,但现在我不断收到消息“在修复软件包目录之前,无法安装或删除项目。我尝试过

sudo apt-get install -f

然后得到

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  backintime-gnome
The following packages will be upgraded:
  backintime-gnome
1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 0 B/39.4 kB of archives.
After this operation, 24.6 kB of additional disk space will be used.
Do you want to continue [Y/n]?

当我单击 Y 时,我收到以下消息

dpkg: dependency problems prevent configuration of backintime-gnome:
 backintime-gnome depends on backintime-common (= 1.0.7); however:
  Version of backintime-common on system is 1.0.8-1.
dpkg: error processing backintime-gnome (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error     from a previous failure.
                      Errors were encountered while processing:
 backintime-gnome
E: Sub-process /usr/bin/dpkg returned an error code (1)
stephanie@stephanie-ThinkPad-T61:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of backintime-gnome:
 backintime-gnome depends on backintime-common (= 1.0.7); however:
  Version of backintime-common on system is 1.0.8-1.    
dpkg: error processing backintime-gnome (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 backintime-gnome

答案1

有时损坏的安装包会损坏您的包管理系统,导致您的 Linux 无法安装或删除任何包(软件)。这是我尝试为 Ubuntu 安装 ndas-admin 后从 apt-get 收到的消息错误消息。

$sudo apt-get install mplayer(或任何软件包) 正在读取软件包列表…完成 正在构建依赖关系树
正在读取状态信息…完成 E:需要重新安装软件包 ndas-admin,但我找不到它的存档。(这是错误)

我尝试:$ sudo apt-get install -f ,尝试修复该问题,但出现相同的错误。我唯一的选择是手动编辑 dpkg 状态文件。

$ sudo gedit /var/lib/dpkg/status    (if you prefer you can use vi instead of gedit)
Locate the corrupt package, and remove the whole block of information about it and save the file. Mine looked like this:

Package: ndas-admin
Status: deinstall reinstreq half-configured
Priority: extra
Section: alien
Installed-Size: 100
Maintainer: root <root@ubuntu510>
Architecture: i386
Version: 1.0.2-24
Depends: libc6 (>= 2.3.4-1)
Description: Administration toosl for XIMETA,Inc NDAS device driver for Linux operating system
 ndas-admin – This program allows the user to register/enable/disable/unregister the XIMETA NDAS hard disk.
 .
 (Converted from a rpm package by alien version 8.53.)

已修复。希望这对其他人有帮助。

答案2

我在使用 Google Chrome 时也遇到了同样的问题。当它在软件中心继续安装时,它会停止安装并发出错误。

使用以下命令删除不完整的安装

 sudo apt-get autoremove 

然后尝试再次下载文件并通过软件中心进行安装。如果不成功,请尝试使用命令提示符方法

sudo apt-get -f install

如果不是第二次,请再次从系统中删除不健康的软件包,以便您可以安装其他应用程序。

相关内容