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

我试图及时安装,现在我不断收到消息’在修复软件包目录之前无法安装或删除项目。 我试过了

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 

有时,损坏的安装包可能会破坏您的软件包管理系统,导致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  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.) 

固定。 希望这有助于其他人。

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

使用以下命令删除未完成的安装

  sudo apt-get autoremove 

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

 sudo apt-get -f install 

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