升级失败...有点,现在无法安装某些软件包

升级失败...有点,现在无法安装某些软件包

当我尝试升级我的服务器时(使用do-release-upgrade -d,因为目前从 10.04 升级到 12.04 时必须这样做),脚本冻结了,我被迫取消它。我剩下一半是 10.04,一半是 12.04 的系统,但能够使用 手动升级大部分内容aptitude upgrade --full-resolver

我现在的状况是启动没有问题,而且大多数应用程序都安装正确,但有几个包就是无法安装。我试过了apt-get install -f,,,,但我就是想不出该怎么做。apt-get purgedpkg-reconfigure -a

root@NCLI-SERVER:~# apt-get install -f
Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
16 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up fontconfig-config (2.8.0-3ubuntu9) ...
rmdir: failed to remove `/var/lib/defoma/fontconfig.d/': Directory not empty
dpkg: error processing fontconfig-config (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libfontconfig1:
 libfontconfig1 depends on fontconfig-config (= 2.8.0-3ubuntu9); however:
  Package fontconfig-config is not configured yet.
dpkg: error processing libfontconfig1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgd2-xpm:
 libgd2-xpm depends on libfontconfig1 (>= 2.8.0); however:
  Package libfontconfig1 is not configured yet.
dpkg: error processing libgd2-xpm (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgphoto2-2:
 libgphoto2-2 depends on libgd2-xpm (>= 2.0.36~rc1~dfsg); however:
  Package libgd2-xpm is not configured yet.
dpkg: error processing libgphoto2-2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libsane:
 libsane depends on libgphoto2-2 (>= 2.4.10.1); however:
  Package libgphoto2-2 is not configured yet.
dpkg: error processing libsane (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of colord:
 colord depends on libsane (>= 1.0.11-3); however:
  Package libsane is not configured yet.
dpkg: error processing colord (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpoppler19:
 libpoppler19 depends on libfontconfig1 (>= 2.8.0); however:
  Package libfontconfig1 is not configured yet.
dpkg: error processing libpoppler19 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgs9:
 libgs9 depends on libfontconfig1 (>= 2.8.0); however:
  Package libfontconfig1 is not configured yet.
dpkg: error processing libgs9 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cups-filters:
 cups-filters depends on libfontconfig1 (>= 2.8.0); however:
  Package libfontconfig1 is not configured yet.
 cups-filters depends on libpoppler19; however:
  Package libpoppler19 is not configured yet.
dpkg: error processing cups-filters (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libcairo2:
 libcairo2 depends on libfontconfig1 (>= 2.8.0); however:
  Package libfontconfig1 is not configured yet.
dpkg: error processing libcairo2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of poppler-utils:
 poppler-utils depends on libcairo2 (>= 1.10.0); however:
  Package libcairo2 is not configured yet.
 poppler-utils depends on libpoppler19; however:
  Package libpoppler19 is not configured yet.
dpkg: error processing poppler-utils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of cups:
 cups depends on poppler-utils (>= 0.12); however:
  Package poppler-utils is not configured yet.
 cups depends on cups-filters; however:
  Package cups-filters is not configured yet.
dpkg: error processing cups (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of printer-driver-gutenprint:
 printer-driver-gutenprint depends on cups (>= 1.3.0); however:
  Package cups is not configured yet.
dpkg: error processing printer-driver-gutenprint (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ghostscript:
 ghostscript depends on libgs9 (= 9.05~dfsg-0ubuntu4); however:
  Package libgs9 is not configured yet.
dpkg: error processing ghostscript (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gs-cjk-resource:
 gs-cjk-resource depends on ghostscript (>= 8.70~dfsg-2.1); however:
  Package ghostscript is not configured yet.
dpkg: error processing gs-cjk-resource (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ghostscript-cups:
 ghostscript-cups depends on ghostscript (>= 8.64~dfsg-8); however:
  Package ghostscript is not configured yet.
dpkg: error processing ghostscript-cups (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 fontconfig-config
 libfontconfig1
 libgd2-xpm
 libgphoto2-2
 libsane
 colord
 libpoppler19
 libgs9
 cups-filters
 libcairo2
 poppler-utils
 cups
 printer-driver-gutenprint
 ghostscript
 gs-cjk-resource
 ghostscript-cups
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

从您的日志开始:

rmdir: failed to remove `/var/lib/defoma/fontconfig.d/': Directory not empty

尝试删除此目录中的所有文件,毕竟该目录将被更新删除,因此似乎不会造成任何损害:

rm /var/lib/defoma/fontconfig.d/*

相关内容