Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Yesterday I found that the Code::Blocks 13.12 on my Ubuntu 12.04 LTS is broken, when I clicked the icon, it reacted nothing, so I tried to reinstall.

I tried to use the instructions from codeblocks' official website to install codeblocks http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Ubuntu but it failed

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

then I tried this

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

and after this I installed Code::Blocks 13.12 successfully, but when I opened it I found that I can't build or run any files(seemed to have problem with plugins)

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

and then I found my package system was broken... I don't have Synaptic Package Manager on my computer, I followed this instruction(from Package system is broken. How to fix it?)

After you get that error, try sudo apt-get -f install to force an install of the files that didn't get loaded because of the error.

Then try sudo apt-get update again, sudo apt-get -f install back and forth until only the package that has the error is left.

sudo dpkg --configure -a

and clean the cache

sudo apt-get clean

it looks like that nothing effective was done. I opened Ubuntu Software Center, and it notified me to download something to repair the package system, I did it, and in the end I found my package system is still broken...

Is there anyone who have a good idea about what to do next?

share|improve this question

1 Answer 1

From the dpkg output, it looks like you need to upgrade libfontconfig1 and install libgamin0. The codeblocks packages cannot install until you do this.

For the newer version of libfontconfig1, you either need to upgrade Ubuntu (12.10 or newer) or find a PPA with a newer version for 12.04.

For libgamin0, it should be available to install. Make sure the universe repository is enabled (in Synaptic or Software Settings).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.