1

Whenever I try to run sudo apt-get -f install I get this error. Here is all of the output of 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:
  codeblocks-contrib codeblocks-dev gamin libcodeblocks0 libgamin0
  libwxsmithlib-dev
Recommended packages:
  valgrind
The following packages will be REMOVED:
  codeblocks-headers
The following NEW packages will be installed:
  gamin libgamin0 libwxsmithlib-dev
The following packages will be upgraded:
  codeblocks-contrib codeblocks-dev libcodeblocks0
3 upgraded, 3 newly installed, 1 to remove and 20 not upgraded.
5 not fully installed or removed.
Need to get 0 B/5,309 kB of archives.
After this operation, 1,163 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 174515 files and directories currently installed.)
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)

Does anyone think they can help me solve this problem?

Braiam
  • 67,791
  • 32
  • 179
  • 269

3 Answers3

1

The codeblock-headers is in process of being removed, but for some reason apt-get won't do that first, you only need to remove it manually then install what you need to install:

sudo apt-get remove codeblocks-headers
sudo apt-get install codeblocks-contrib

I would report a bug to the package maintainers also with the problem.

Braiam
  • 67,791
  • 32
  • 179
  • 269
0

Try running:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/codeblocks-dev_13.12-3_amd64.deb

Then run:

sudo apt-get -f install

Source: How to resolve "dpkg: error processing /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb"?

OR

sudo apt-get remove codeblocks-dev && sudo apt-get install -f && sudo apt-get install codeblocks-dev 
  • I receive this error when trying to run the first one

    dpkg: error processing package codeblocks-dev (--install): dependency problems - leaving unconfigured Errors were encountered while processing: codeblocks-dev

    – DejectedAxe May 14 '14 at 17:08
  • I fixed it, I just went down the line of errors and removed all of the things from codeblocks that was giving me errors. Thanks for trying to help though. – DejectedAxe May 14 '14 at 17:20
0

the trick is when you remove/purge one pakage !
remove or purge them all with one cmd ,

what worked for me :

sudo apt-get remove codeblocks-contrib codeblocks-dbg codeblocks-contrib-dbg

log

younes@awesomeHostName:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  codeblocks-contrib
Recommended packages:
  valgrind
The following packages will be upgraded:
  codeblocks-contrib
1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
17 not fully installed or removed.
Need to get 0 B/3,018 kB of archives.
After this operation, 1,162 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
younes@awesomeHostName:~$ sudo apt-get remove codeblocks-contrib
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-dbg : Depends: codeblocks-contrib (= 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).
younes@awesomeHostName:~$ sudo apt-get remove codeblocks-contrib codeblocks-dbg
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-dbg : Depends: codeblocks-dbg (= 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).
younes@awesomeHostName:~$ sudo apt-get remove codeblocks-contrib codeblocks-dbg codeblocks-contrib-dbg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  codeblocks-contrib codeblocks-contrib-dbg codeblocks-dbg
0 upgraded, 0 newly installed, 3 to remove and 5 not upgraded.
17 not fully installed or removed.
After this operation, 365 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 114672 files and directories currently installed.)
Removing codeblocks-contrib-dbg (13.12-3) ...
Removing codeblocks-dbg (13.12-3) ...
Removing codeblocks-contrib (13.12-1) ...
Setting up libwxbase2.8-0:amd64 (2.8.12.1+dfsg-2ubuntu2) ...
Setting up libwxgtk2.8-0:amd64 (2.8.12.1+dfsg-2ubuntu2) ...
Setting up codeblocks-common (13.12-3) ...
Setting up libcodeblocks0 (13.12-3) ...
Setting up codeblocks (13.12-3) ...
Setting up codeblocks-dev (13.12-3) ...
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 libwxsmithlib0 (13.12-3) ...
Setting up libwxsmithlib-dev (13.12-3) ...
Setting up libwxsmithlib0-dev (13.12-3) ...
Setting up gamin (0.1.10-4.1ubuntu1) ...
Setting up libgamin0 (0.1.10-4.1ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
younes@awesomeHostName:~$ 
Yunus
  • 341
  • 3
  • 7