使用 apt-get 安装软件包时出现 CUPS 错误

使用 apt-get 安装软件包时出现 CUPS 错误

我最近在 Ubuntu 14.04 中使用该命令sudo apt-get update,现在当我想要安装包时,出现错误。

例如,当我使用sudo apt-get install vagrant它安装 Vagrant 时出现以下错误:

invoke-rc.d: initscript cups, action "start" failed.
dpkg: error processing package cups-daemon (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up fontconfig (2.11.1-0ubuntu6) ...
Regenerating fonts cache... failed.
See /var/log/fontconfig.log for more information.
dpkg: error processing package fontconfig (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of cups-core-drivers:
cups-core-drivers depends on cups-daemon (>= 2.0.2-1ubuntu3); however:
Package cups-daemon is not configured yet.
dpkg: error processing package cups-core-drivers (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of cups:
cups depends on cups-core-drivers (>= 2.0.2-1ubuntu3); however:
Package cups-core-drivers is not configured yet.
cups depends on cups-daemon (>= 2.0.2-1ubuntu3); however:
Package cups-daemon is not configured yet.
dpkg: error processing package cups (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
util-linux
cups-browsed
cups-daemon
fontconfig
cups-core-drivers
cups  
E: Sub-process /usr/bin/dpkg returned an error code (1)

我搜索了有关此错误的详细信息,有人建议使用sudo apt-get upgrade。我试过了,但没有帮助。

我该如何解决这个问题?

答案1

这意味着你添加了错误的 source.list,你的库因此损坏。就我而言,我根据 askubuntu.com 上某个人的回答,在 ubuntu 14.04 中添加了 13.04 的源列表,以使某些东西正常工作,这是我做过的最愚蠢的事情,并且我学会了永远不要添加旧版本的库。但它确实解决了问题,一切都运行正常,直到我重新启动系统。

当我收到此错误时,我重新启动了 ubuntu,但无法再次启动它。重新启动失败。所以我拿了一个 U 盘,将 14.04 升级到 16.04,一切都修好了,我也能安装这个杯子了。这是我唯一能做的事情。

因此使用:

sudo apt-get upgrade

相关内容