This happened after I installed latest version of Code Blocks downloaded from official site, I was not able to run it, so I've been tried to remove it (sudo apt-get remove
) and this happened.
Then I tried:
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get -f install
and got this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
geany-common lib32gcc1 lib32stdc++6 libatk-adaptor libgail-common
liblouis-data liblouis2 python3-brlapi python3-louis python3-pyatspi
python3-speechd
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
codeblocks-contrib codeblocks-dev
Recommended packages:
valgrind
The following packages will be upgraded:
codeblocks-contrib codeblocks-dev
2 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
4 not fully installed or removed.
Need to get 3 369 kB of archives.
After this operation, 2 954 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ru.archive.ubuntu.com/ubuntu/ trusty/universe codeblocks-contrib amd64 13.12-3 [3 018 kB]
Get:2 http://ru.archive.ubuntu.com/ubuntu/ trusty/universe codeblocks-dev amd64 13.12-3 [350 kB]
Fetched 3 369 kB in 0s (5 731 kB/s)
(Reading database ... 337359 files and directories currently installed.)
Preparing to unpack .../codeblocks-contrib_13.12-3_amd64.deb ...
Unpacking codeblocks-contrib (13.12-3) over (13.12-1) ...
dpkg: error processing archive /var/cache/apt/archives/codeblocks-contrib_13.12-3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/pkgconfig/cb_wximagepanel.pc', which is also in package codeblocks-wxcontrib-dev 13.12-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
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/wxContribItems/wxImagePanel/include/wx/wxImagePanel.h', which is also in package codeblocks-wxcontrib-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-contrib_13.12-3_amd64.deb
/var/cache/apt/archives/codeblocks-dev_13.12-3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Additional info:
$ apt-cache policy libwxsmithlib0
libwxsmithlib0:
Installed: 13.12-3
Candidate: 13.12-3
Version table:
*** 13.12-3 0
500 http://ru.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/status
$ apt-cache policy codeblocks
codeblocks:
Installed: 13.12-3
Candidate: 13.12-3
Version table:
*** 13.12-3 0
500 http://ru.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/status
$ apt-cache policy codeblocks-contrib
codeblocks-contrib:
Installed: 13.12-1
Candidate: 13.12-3
Version table:
13.12-3 0
500 http://ru.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
*** 13.12-1 0
100 /var/lib/dpkg/status
$ sudo apt-get install codeblocks-contrib=13.12-3
[sudo] password for user:
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-dev : Depends: libcodeblocks0 (= 13.12-1) but 13.12-3 is to be installed
Depends: codeblocks-headers (= 13.12-1) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
$ apt-cache policy codeblocks-dev
codeblocks-dev:
Installed: 13.12-1
Candidate: 13.12-3
Version table:
13.12-3 0
500 http://ru.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
*** 13.12-1 0
100 /var/lib/dpkg/status
$ sudo apt-get install codeblocks-dev=13.12-3
[sudo] password for user:
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 (= 13.12-1) but 13.12-3 is to be installed
Depends: codeblocks (= 13.12-1) but 13.12-3 is to be installed
Recommends: valgrind but it is not going to be installed
Recommends: cppcheck but it is not going to be installed
Recommends: cscope but it is not going to be installed
Recommends: cccc but it is not going to be installed
codeblocks-dbg : Depends: codeblocks-contrib (= 13.12-3) but 13.12-1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
The answer is in your error message. The packages
codeblocks-headers
andcodeblocks-dev
tries to overwrite files, which are also in the packagescodeblocks-wxcontrib-headers
andcodeblocks-wxcontrib-dev
.But after some clarifications in the chat
And as you said in the comments
That makes no sense. You have deleted some files but no packages.
Now, if you need codeblocks again, reinstall via