软件包错误导致无法在 12.10 中安装任何内容

软件包错误导致无法在 12.10 中安装任何内容

前几天,我尝试了不同的桌面环境,如 Pantheon、Gnome 等。

但是当我尝试安装 Pantheon/Elementary Shell 时,出现了一个错误。我忽略了它,认为它不重要(因为它只是关于主题)。几天前,我正在用窗口管理器和图标测试不同的主题,其中一个主题恰好是 Elementary Icon 包。现在,每当我尝试安装某些东西时,它都会告诉我输入sudo apt-get -f install,当我输入时,我会收到一些错误。这是输出:

$ sudo apt-get install cinnamon

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 cinnamon : Depends: gir1.2-muffin-3.0 but it is not going to be installed
        Depends: libmuffin0 (>= 1.1.2) but it is not going to be installed
        Depends: caribou but it is not going to be installed
        Depends: mesa-utils but it is not going to be installed
        Depends: gkbd-capplet but it is not going to be installed
        Recommends: nemo but it is not going to be installed
 elementary-artwork : Depends: elementary-theme but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

$ sudo apt-get -f install

 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Correcting dependencies... Done
 The following extra packages will be installed:
  elementary-theme
    The following NEW packages will be installed:
  elementary-theme
    0 upgraded, 1 newly installed, 0 to remove and 41 not upgraded.
     2 not fully installed or removed.
     Need to get 0 B/57.4 kB of archives.
     After this operation, 415 kB of additional disk space will be used.
     Do you want to continue [Y/n]? y
 (Reading database ... 279974 files and directories currently installed.)
 Unpacking elementary-theme (from .../elementary-theme_3.2-0~r601+pkg289~quantal1_all.deb) ...
 dpkg: error processing /var/cache/apt/archives/elementary-theme_3.2-0~r601+pkg289~quantal1_all.deb (--unpack):
 trying to overwrite '/usr/share/themes/elementary/gtk-3.0/toolbar.css', which is  also in package elementary 3.1
 Errors were encountered while processing:
  /var/cache/apt/archives/elementary-theme_3.2-0~r601+pkg289~quantal1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)"

在通知位置(在 Unity 的顶部栏中,在 gnome 屏幕底部的通知中心)出现错误:

发生错误。请从右键菜单运行包管理器或在终端中运行 apt-get 以查看错误所在。错误消息为:错误:BrokenCount > 0”。这通常意味着您安装的包必须具有未满足的依赖关系。

答案1

我找到了解决这个问题的方法,我只需在终端中输入这个命令:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/elementary-theme_3.2-0~r601+pkg289~quantal1_all.deb

然后我重新输入了之前的命令:

sudo apt-get -f install

然后一切恢复正常,现在一切都运转良好。

相关内容