1

I have tried to install codeblocks following the instructions on:

http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_nightly_build_on_Ubuntu

but finally did something wrong.

woelrat@ubuntu:~$ dpkg -l | grep codeb
ii  codeblocks 13.12-3 amd64        Code::Blocks integrated development environment (IDE)
ii  codeblocks-common                                     13.12-3                                             all          common files for Code::Blocks IDE
iU  codeblocks-contrib-dbg                                13.12-3                                             amd64        dummy transitional package for Code::Blocks debugging symbols
iU  codeblocks-dbg                                        13.12-3                                             amd64        Code::Blocks debugging libraries
ii  codeblocks-dev                                        13.12-1                                             amd64        Code::Blocks development libraries (SDK)
ri  codeblocks-headers                                    13.12-1                                             all          Code::Blocks development headers (SDK)
ri  codeblocks-libwxcontrib0                              13.12-1                                             amd64        Code::Blocks shared libraries for wxContribItems
ri  codeblocks-wxcontrib-dev                              13.12-1                                             amd64        Code::Blocks development libraries for wxContribItems
ii  codeblocks-wxcontrib-headers                          13.12-1                                             all          Code::Blocks development headers for wxContribItems
ii  libcodeblocks0                                        13.12-1                                             amd64        Code::Blocks shared libraries

I already tried sudo apt-get -f install with following errors:

Preparing to unpack .../codeblocks-dev_13.12-3_amd64.deb ...
Unpacking codeblocks-dev (13.12-3) over (13.12-1) ...
dpkg: error processing archive /var/cache/apt/archives/codeblocks-dev_13.12-3_amd64.deb (--unpack):
trying to overwrite '/usr/include/codeblocks/externaldepsdlg.h', which is also in package codeblocks-headers 13.12-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/codeblocks-dev_13.12-3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

The following packages have unmet dependencies:

codeblocks-dbg : Depends: codeblocks-contrib (= 13.12-3) but it is not going to be installed

codeblocks-headers : Depends: codeblocks-dev (>= 13.12-1) but it is not going to be installed
                  Depends: codeblocks-dev (< 13.12-1.1~) but it is not going to be installed

libwxsmithlib0 : Depends: libcodeblocks0 (= 13.12-3) but 13.12-1 is to be installed
              Recommends: codeblocks-contrib (= 13.12-3) but it is not going to be installed
libwxsmithlib0-dev : Depends: libwxsmithlib-dev (= 13.12-3) but it is not going to be installed

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Some tips how I can solve this? Where do I need to start?

$ sudo apt-get install libwxsmithlib0 libwxsmithlib0-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libwxsmithlib0 is already the newest version.
libwxsmithlib0-dev is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 codeblocks-dbg : Depends: codeblocks-contrib (= 13.12-3) but it is not going to be installed
 libwxsmithlib0 : Depends: libcodeblocks0 (= 13.12-3) but 13.12-1 is to be installed
                  Recommends: codeblocks-contrib (= 13.12-3) but it is not going to be installed
 libwxsmithlib0-dev : Depends: libwxsmithlib-dev (= 13.12-3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I still have a problem with dependencies. Anyone an idea how to solve this?

2
  • If you want to install the wxsmith and/or contrib packages, you must install the libwxsmithlib0 package first. apt-get install libwxsmithlib0 libwxsmithlib0-dev . Make sure you have your universe and multiverse repositories enabled.
    – Ova
    Oct 22, 2015 at 8:36
  • I tried apt-get install libwxsmithlib0 libwxsmithlib0-dev but I still have a problem with dependencies (see original post). Someone an idea how to solve this?
    – woelrat
    Oct 22, 2015 at 18:59

3 Answers 3

0

@woelrat thanks for your reply. I have just solved my same problem.

Steps:

  • List all relative packets about codeblocks

    dpkg --list | grep -i codeblocks
    
  • Then remove packages have unmet dependencies

    sudo dpkg --purge codeblocks-dev
    sudo apt-get update && sudo apt-get upgrade && sudo apt-get -f install
    

Voilaaa..

Maybe your software-center is crashed by some failures. I suggest you fresh install

sudo apt-get remove -f software-center && sudo apt-get install -f software-center

Now you can install stable version of codeblocks using software-center.

0

I removed all the packages individually. (you need to find out the right order!)

sudo dpkg -i packages-name.deb

needed to force the remove of one of the packages (Dependencies were in a loop between tree packages)

Installed codeblocks with the ubuntu software manager. This was done in 5 minutes :-)

0

Try:

sudo apt purge codeblocks*

This will remove all file related to codeblocks. Then try:

sudo apt -f install

sudo apt autoremove

Your issue will be solved and install it from Ubuntu software for easy installation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .