Não é possível corrigir dependências não atendidas

3

Isso aconteceu depois que instalei a versão mais recente do Code Blocks baixada do site oficial, não consegui executá-la, então tentei removê-la ( sudo apt-get remove ) e isso aconteceu.

Então eu tentei:

sudo apt-get clean
sudo apt-get autoclean
sudo apt-get -f install

e tenho isso:

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)

Informação adicional:

$ 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).
    
por R S 01.10.2015 / 00:40

1 resposta

2

A resposta está na sua mensagem de erro. Os pacotes codeblocks-headers e codeblocks-dev tentam sobrescrever arquivos, que também estão nos pacotes codeblocks-wxcontrib-headers e codeblocks-wxcontrib-dev .

Mas depois de alguns esclarecimentos no chat

dpkg -l | awk '/ codeblocks-/ {system("sudo dpkg -r --force-all " )}'
sudo dpkg -r --force-all  libcodeblocks0

E como você disse nos comentários

  

Eu removi estes pacotes por "rm -rf" mas isso não ajudou:   / usr / bin / codeblocks / usr / lib / codeblocks / usr / bin / X11 / codeblocks   / usr / include / codeblocks / usr / share / codeblocks   /usr/share/man/man1/codeblocks.1.gz

Isso não faz sentido. Você excluiu alguns arquivos, mas não há pacotes.

Agora, se você precisar de codeblocks novamente, reinstale via

sudo apt-get install codeblocks
    
por A.B. 01.10.2015 / 07:08