Pacotes quebrados e não podem ser executados -f install

1

Depois de instalar os codeblocks, ele começou a me dar erro Estou recebendo muitos erros. Eu sou novo no Ubuntu (do 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

Quando uso o Apt, recebo este erro

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 não está funcionando

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

E quando eu uso o Centro de Software, ele mostra esse erro

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

E ao solicitar que este erro seja exibido

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

Obrigado: -)

    
por MegaGeek 23.09.2013 / 14:42

2 respostas

2

Primeiro, ao tentar executar apt-get -f install você precisa ser root. O Apt-get assume que você é root porque você usou o sudo apt-get para rodar o programa; É por isso que o código sugerido não incluiu o sudo e, subseqüentemente, não funcionou. Isso é o que os dois erros após o comando apt-get -f install indicam. Eu percebo a frustração e porque você iria querer voltar e tentar o dpkg novamente.

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

Se você não puder resolver os pacotes quebrados desta forma, use o synaptic para corrigir os pacotes quebrados.

sudo apt-get install synaptic

e

sudo synaptic

. . para executar o programa.

Agora, selecione "corrigir pacotes quebrados" no menu "editar" e clique no botão "aplicar". Depois disso, você pode até procurar e instalar gimp e codeblocks usando o synaptic também. O gerenciador de pacotes synaptic usa o repositório apt-get, é muito mais rápido que o centro de software e parece ser mais capaz de lidar com pacotes quebrados.    Como um usuário mais novo, pode ser difícil quebrar o hábito de baixar um arquivo .exe do sourceforge, clicar com o botão direito e selecionar "executar" sempre que você quiser instalar um novo programa. Parece que você está tentando instalar uma versão baixada desatualizada de codeblocks. Codeblocks e gimp estão disponíveis no repositório oficialmente atualizado. Se não estiver disponível para você através do apt-get, use synaptic para habilitar repositórios de terceiros e então faça um sudo apt-get update antes de tentar novamente. No entanto, às vezes, um programa não está disponível no repositório, mas está disponível em qualquer lugar como um arquivo .deb. . . para evitar problemas de dependência durante a instalação, você pode clicar com o botão direito em um arquivo deb e abri-lo com o gerenciador de arquivos, o centro de software ou um gerenciador de pacotes como o gdebi para instalar e resolver automaticamente os dependências para você. Boa sorte.

    
por mchid 13.02.2014 / 12:01
0

Execute este comando:

sudo apt-get -f install
    
por SirCharlo 23.09.2013 / 15:54