包装系统损坏的问题

包装系统损坏的问题

昨天我发现我的 Ubuntu 12.04 LTS 上的 Code::Blocks 13.12 坏了,当我点击图标时,它没有任何反应,所以我尝试重新安装。

我尝试使用 codeblocks 官方网站的说明来安装 codeblocks http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Ubuntu 但它失败了

yuyue@ThinkPad:~/Downloads/debian-stable/amd64$ sudo dpkg -i *.deb
    dpkg-deb: error: `amd64.deb' is not a debian format archive
    dpkg: error processing amd64.deb (--install):
     subprocess dpkg-deb --control returned error exit status 2
    Selecting previously unselected package codeblocks.
    (Reading database ... 299683 files and directories currently installed.)
    Unpacking codeblocks (from codeblocks_13.12-1_amd64.deb) ...
    Preparing to replace codeblocks-common 13.12-1 (using codeblocks-common_13.12-1_all.deb) ...
    Unpacking replacement codeblocks-common ...
    Selecting previously unselected package codeblocks-contrib.
    Unpacking codeblocks-contrib (from codeblocks-contrib_13.12-1_amd64.deb) ...
    Preparing to replace codeblocks-contrib-common 13.12-1 (using codeblocks-contrib-common_13.12-1_all.deb) ...
    Unpacking replacement codeblocks-contrib-common ...
    Selecting previously unselected package codeblocks-contrib-dbg.
    Unpacking codeblocks-contrib-dbg (from codeblocks-contrib-dbg_13.12-1_amd64.deb) ...
    Selecting previously unselected package codeblocks-dbg.
    Unpacking codeblocks-dbg (from codeblocks-dbg_13.12-1_amd64.deb) ...
    Preparing to replace codeblocks-dev 13.12-1 (using codeblocks-dev_13.12-1_amd64.deb) ...
    Unpacking replacement codeblocks-dev ...
    Preparing to replace codeblocks-headers 13.12-1 (using codeblocks-headers_13.12-1_all.deb) ...
    Unpacking replacement codeblocks-headers ...
    Preparing to replace codeblocks-libwxcontrib0 13.12-1 (using codeblocks-libwxcontrib0_13.12-1_amd64.deb) ...
    Unpacking replacement codeblocks-libwxcontrib0 ...
    Preparing to replace codeblocks-wxcontrib-dev 13.12-1 (using codeblocks-wxcontrib-dev_13.12-1_amd64.deb) ...
    Unpacking replacement codeblocks-wxcontrib-dev ...
    Preparing to replace codeblocks-wxcontrib-headers 13.12-1 (using codeblocks-wxcontrib-headers_13.12-1_all.deb) ...
    Unpacking replacement codeblocks-wxcontrib-headers ...
    Preparing to replace libcodeblocks0 13.12-1 (using libcodeblocks0_13.12-1_amd64.deb) ...
    Unpacking replacement libcodeblocks0 ...
    Preparing to replace libwxsmithlib0 13.12-1 (using libwxsmithlib0_13.12-1_amd64.deb) ...
    Unpacking replacement libwxsmithlib0 ...
    Preparing to replace libwxsmithlib0-dev 13.12-1 (using libwxsmithlib0-dev_13.12-1_amd64.deb) ...
    Unpacking replacement libwxsmithlib0-dev ...
    Preparing to replace wxsmith-dev 13.12-1 (using wxsmith-dev_13.12-1_amd64.deb) ...
    Unpacking replacement wxsmith-dev ...
    Preparing to replace wxsmith-headers 13.12-1 (using wxsmith-headers_13.12-1_all.deb) ...
    Unpacking replacement wxsmith-headers ...
    dpkg: dependency problems prevent configuration of codeblocks:
     codeblocks depends on libfontconfig1 (>= 2.9.0); however:
      Version of libfontconfig1 on system is 2.8.0-3ubuntu9.1.
    dpkg: error processing codeblocks (--install):
     dependency problems - leaving unconfigured
    Setting up codeblocks-common (13.12-1) ...
    dpkg: dependency problems prevent configuration of codeblocks-contrib:
     codeblocks-contrib depends on libfontconfig1 (>= 2.9.0); however:
      Version of libfontconfig1 on system is 2.8.0-3ubuntu9.1.
     codeblocks-contrib depends on libgamin0; however:
      Package libgamin0 is not installed.
     codeblocks-contrib depends on codeblocks (= 13.12-1); however:
      Package codeblocks is not configured yet.
    dpkg: error processing codeblocks-contrib (--install):
     dependency problems - leaving unconfigured
    Setting up codeblocks-contrib-common (13.12-1) ...
    dpkg: dependency problems prevent configuration of codeblocks-contrib-dbg:
     codeblocks-contrib-dbg depends on codeblocks-contrib (= 13.12-1); however:
      Package codeblocks-contrib is not configured yet.
    dpkg: error processing codeblocks-contrib-dbg (--install):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of codeblocks-dbg:
     codeblocks-dbg depends on codeblocks (= 13.12-1); however:
      Package codeblocks is not configured yet.
    dpkg: error processing codeblocks-dbg (--install):
     dependency problems - leaving unconfigured
    Setting up codeblocks-libwxcontrib0 (13.12-1) ...
    Setting up codeblocks-wxcontrib-dev (13.12-1) ...
    Setting up codeblocks-wxcontrib-headers (13.12-1) ...
    Setting up libcodeblocks0 (13.12-1) ...
    Setting up libwxsmithlib0 (13.12-1) ...
    Setting up wxsmith-dev (13.12-1) ...
    Setting up wxsmith-headers (13.12-1) ...
    Setting up libwxsmithlib0-dev (13.12-1) ...
    Setting up codeblocks-dev (13.12-1) ...
    Setting up codeblocks-headers (13.12-1) ...
    Processing triggers for shared-mime-info ...
    Processing triggers for desktop-file-utils ...
    Processing triggers for bamfdaemon ...
    Rebuilding /usr/share/applications/bamf.index...
    Processing triggers for gnome-menus ...
    Processing triggers for hicolor-icon-theme ...
    Processing triggers for man-db ...
    Processing triggers for libc-bin ...
    ldconfig deferred processing now taking place
    Errors were encountered while processing:
     amd64.deb
     codeblocks
     codeblocks-contrib
     codeblocks-contrib-dbg
     codeblocks-dbg

然后我尝试了这个

sudo add-apt-repository ppa:pasgui/ppa
sudo apt-get update
sudo apt-get install codeblocks

之后我成功安装了 Code::Blocks 13.12,但是当我打开它时,我发现我无法构建或运行任何文件(似乎插件有问题)

Errors were encountered while processing: codeblocks codeblocks-contrib codeblocks-dbg codeblocks-contrib-dbg E: Sub-process /usr/bin/dpkg returned an error code (1) 

然后我发现我的软件包系统坏了...我的电脑上没有 Synaptic 软件包管理器,我按照这个说明操作(来自包裹系统坏了。该如何修复?

收到该错误后,请尝试 sudo apt-get -f install 强制安装由于错误而未加载的文件。

然后再次尝试 sudo apt-get update,sudo apt-get -f install 来回尝试直到只剩下出现错误的包。

sudo dpkg--configure-a

并清理缓存

sudo apt-get clean

看起来似乎没有什么有效的措施。我打开 Ubuntu 软件中心,它通知我下载一些东西来修复软件包系统,我照做了,结果发现我的软件包系统仍然坏了……

有谁知道下一步该做什么吗?

答案1

dpkg输出来看,您需要升级libfontconfig1并安装libgamin0codeblocks执行此操作之前,无法安装软件包。

对于较新版本的libfontconfig1,您需要升级 Ubuntu(12.10 或更新版本)或找到适用于 12.04 的较新版本的 PPA。

对于libgamin0,它应该可以安装。确保universe存储库已启用(在 Synaptic 或软件设置中)。

相关内容