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.

After I installed codeblocks it started giving me error I'm getting loads of errors. I'm new to Ubuntu( from windows)

sudo dpkg --configure -a 
dpkg: dependency problems prevent configuration of codeblocks-contrib:
 codeblocks-contrib depends on libwxsmithlib0 (= 10.05-1); however:
  Version of libwxsmithlib0 on system is 12.11-2.
 codeblocks-contrib depends on codeblocks (= 10.05-1); however:
  Version of codeblocks on system is 12.11-2.
dpkg: error processing codeblocks-contrib (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libwxsmithlib0-dev:
 libwxsmithlib0-dev depends on libwxsmithlib-dev (= 12.11-2); however:
  Package libwxsmithlib-dev is not installed.
dpkg: error processing libwxsmithlib0-dev (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 codeblocks-contrib
 libwxsmithlib0-dev

When I use Apt I get this error

sudo apt-get install gimp
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:
 codeblocks-contrib : Depends: libwxsmithlib0 (= 10.05-1) but 12.11-2 is to be installed
                      Depends: codeblocks (= 10.05-1) but 12.11-2 is to be installed
 codeblocks-dev : Depends: libcodeblocks0 (= 10.05-1) but 12.11-2 is to be installed
 gimp : Depends: libgimp2.0 (>= 2.8.4) but it is not going to be installed
        Depends: libgimp2.0 (<= 2.8.4-z) but it is not going to be installed
        Depends: gimp-data (>= 2.8.4) but it is not going to be installed
        Depends: gimp-data (<= 2.8.4-z) but it is not going to be installed
        Depends: libbabl-0.1-0 (>= 0.1.10) but it is not going to be installed
        Depends: libgegl-0.2-0 (>= 0.2.0) but it is not going to be installed
        Depends: libwebkitgtk-1.0-0 (>= 1.3.10) but it is not going to be installed
 libwxsmithlib0-dev : Depends: libwxsmithlib-dev (= 12.11-2) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

-f isn't working either

apt-get -f install
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
sahil@sahil-ch:~$ sudo -s
root@sahil-ch:~# sudo dpkg --configure -a 
dpkg: dependency problems prevent configuration of codeblocks-contrib:
 codeblocks-contrib depends on libwxsmithlib0 (= 10.05-1); however:
  Version of libwxsmithlib0 on system is 12.11-2.
 codeblocks-contrib depends on codeblocks (= 10.05-1); however:
  Version of codeblocks on system is 12.11-2.

dpkg: error processing codeblocks-contrib (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libwxsmithlib0-dev:
 libwxsmithlib0-dev depends on libwxsmithlib-dev (= 12.11-2); however:
  Package libwxsmithlib-dev is not installed.

dpkg: error processing libwxsmithlib0-dev (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 codeblocks-contrib
 libwxsmithlib0-dev

And when I use Software center it shows this error

New software can't be installed, because there is a problem with software currently installed. Do you want to repair this problem now?

And on prompting this error is shown

InstallArchives() failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_IN.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 162153 files and directories currently installed.)
Preparing to replace codeblocks-contrib 10.05-1 (using .../codeblocks-contrib_12.11-2_i386.deb) ...
Unpacking replacement codeblocks-contrib ...
dpkg: error processing /var/cache/apt/archives/codeblocks-contrib_12.11-2_i386.deb (--unpack):
 trying to overwrite '/usr/share/codeblocks/cb_koders.zip', which is also in package codeblocks-contrib-common 10.05-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking libwxsmithlib-dev (from .../libwxsmithlib-dev_12.11-2_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libwxsmithlib-dev_12.11-2_i386.deb (--unpack):
 trying to overwrite '/usr/include/wxsmith/properties/wxsflagsproperty.h', which is also in package wxsmith-headers 10.05-1
Preparing to replace codeblocks-dev 10.05-1 (using .../codeblocks-dev_12.11-2_i386.deb) ...
Unpacking replacement codeblocks-dev ...
dpkg: error processing /var/cache/apt/archives/codeblocks-dev_12.11-2_i386.deb (--unpack):
 trying to overwrite '/usr/include/codeblocks/filefilters.h', which is also in package codeblocks-headers 10.05-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/codeblocks-contrib_12.11-2_i386.deb
 /var/cache/apt/archives/libwxsmithlib-dev_12.11-2_i386.deb
 /var/cache/apt/archives/codeblocks-dev_12.11-2_i386.deb
dpkg: dependency problems prevent configuration of codeblocks-contrib:
 codeblocks-contrib depends on libwxsmithlib0 (= 10.05-1); however:
  Version of libwxsmithlib0 on system is 12.11-2.
 codeblocks-contrib depends on codeblocks (= 10.05-1); however:
  Version of codeblocks on system is 12.11-2.

dpkg: error processing codeblocks-contrib (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libwxsmithlib0-dev:
 libwxsmithlib0-dev depends on libwxsmithlib-dev (= 12.11-2); however:
  Package libwxsmithlib-dev is not installed.

dpkg: error processing libwxsmithlib0-dev (--configure):
 dependency problems - leaving unconfigured

Thank you :-)

share|improve this question
    
The answers in the duplicated doesn't solve any of the problems the OP has. A generic answer doesn't solve this problem. –  Braiam Sep 25 '13 at 17:48

2 Answers 2

First, when trying to execute apt-get -f install you need to be root. Apt-get assumes you are root because you used sudo apt-get to run the program; this is why the suggested code did not include sudo and subsequently did not work. This is what the two errors following the apt-get -f install command indicate. I realize the frustration and why you would then want to go back and try dpkg again.

sudo apt-get update

sudo apt-get purge codeblocks codeblocks-contrib libwxsmithlib0-dev

sudo apt-get dist-upgrade

sudo apt-get -f install

sudo apt-get install gimp codeblocks-contrib

If you cannot resolve heald broken packages this way, use synaptic to fix the broken packages.

sudo apt-get install synaptic

and

sudo synaptic

. . . to run the program.

Now, select "fix broken packages" from the "edit" menu and click the "apply" button. After that, you can even search for and install gimp and codeblocks using synaptic as well. The synaptic package manager uses the apt-get repository, is much faster than software center, and seems to be more capable of dealing with broken packages. As a newer user, it can be hard to break the habbit of downloading an .exe file from sourceforge, right clicking, and selecting "run" any time you want to install a new program. It appears you are trying to install an outdated downloaded version of codeblocks. Codeblocks and gimp are available in the officially updated repository. If it is not available to you through apt-get, use synaptic to enable third party repositories and then do a sudo apt-get update before trying again. However, sometimes a program is not available from the repository but is available from wherever as a .deb file . . . in order to avoid dependency issues during installation, you can right click a deb file and open it with archive manager, software-center, or a package manager like gdebi to automatically install and resolve dependency issuses for you. Good luck.

share|improve this answer
    
if it says 'blah, blah, blah, is not installed so cannot remove', try the purge command line again without 'blah, blah, blah' package –  mchid Feb 13 at 11:17

Run this command:

sudo apt-get -f install
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.