Erro de instalação do Aptitude

4

Estou executando apt-get install aptitude , mas isso me dá este erro: ‌

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 aptitude : Depends: libcwidget3 but it is not going to be installed
            Depends: libstdc++6 (>= 4.9) but 4.8.4-2ubuntu1~14.04 is to be installed
            Depends: libxapian22 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

O que está errado?

Aqui estão algumas informações adicionais:

$ uname -a
Linux ubuntu 3.19.0-47-generic #53~14.04.1-Ubuntu SMP Mon Jan 18 16:09:14 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -r
Release:    15.04

$ apt-cache policy aptitude libcwidget3 libstdc++6 libxapian22
 aptitude:
  Installed: (none)
  Candidate: 0.6.11-1ubuntu3
  Version table:
     0.6.11-1ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
     0.6.8.2-1ubuntu4 0
        100 /var/lib/dpkg/status
libcwidget3:
  Installed: (none)
  Candidate: 0.5.17-2ubuntu1
  Version table:
     0.5.17-2ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
     0.5.16-3.5ubuntu1 0
        100 /var/lib/dpkg/status
libstdc++6:
  Installed: 4.8.4-2ubuntu1~14.04
  Candidate: 4.9.2-10ubuntu13
  Version table:
     4.9.2-10ubuntu13 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
 *** 4.8.4-2ubuntu1~14.04 0
        100 /var/lib/dpkg/status
libxapian22:
  Installed: (none)
  Candidate: 1.2.19-1
  Version table:
     1.2.19-1 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
     1.2.16-2ubuntu1 0
        100 /var/lib/dpkg/status

Atualizações

$ sudo apt-get install libstdc++6=4.9.2-10ubuntu13 :
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libstdc++6
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.

e

$ apt-cache policy libstdc++6
libstdc++6:
  Installed: 4.8.4-2ubuntu1~14.04
  Candidate: 4.9.2-10ubuntu13
  Version table:
     4.9.2-10ubuntu13 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
 *** 4.8.4-2ubuntu1~14.04 0
        100 /var/lib/dpkg/status

$ sudo dpkg -i libstdc++6_4.9.2-10ubuntu13_amd64.deb
(Reading database ... 103371 files and directories currently installed.)
Preparing to unpack libstdc++6_4.9.2-10ubuntu13_amd64.deb ...
Unpacking libstdc++6:amd64 (4.9.2-10ubuntu13) over (4.9.2-10ubuntu13) ...
dpkg: dependency problems prevent configuration of libstdc++6:amd64:
 libstdc++6:amd64 depends on gcc-4.9-base (= 4.9.2-10ubuntu13); however:
  Version of gcc-4.9-base:amd64 on system is 4.9.3-0ubuntu4.

dpkg: error processing package libstdc++6:amd64 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libstdc++6:amd64

$ sudo apt-get install gcc-4.9-base=4.9.2-10ubuntu13
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:
 gcc-4.9-base : Breaks: gcc-4.9-base:i386 (!= 4.9.2-10ubuntu13) but 4.9.3-0ubuntu4 is to be installed
 gcc-4.9-base:i386 : Breaks: gcc-4.9-base (!= 4.9.3-0ubuntu4) but 4.9.2-10ubuntu13 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

$ apt-cache policy gcc-4.9-base
gcc-4.9-base:
  Installed: 4.9.3-0ubuntu4
  Candidate: 4.9.3-0ubuntu4
  Version table:
 *** 4.9.3-0ubuntu4 0
        100 /var/lib/dpkg/status
     4.9.2-10ubuntu13 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages

   $ sudo apt-get install gcc-4.9=4.9.2-10ubuntu13 gcc-4.9-base=4.9.2-10ubuntu13 gcc-4.9:i386=4.9.2-10ubuntu13 gcc-4.9-base:i386=4.9.2-10ubuntu13
    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:
     gcc-4.9 : Depends: cpp-4.9 (= 4.9.2-10ubuntu13) but it is not going to be installed
               Depends: libgcc-4.9-dev (= 4.9.2-10ubuntu13) but it is not going to be installed
               Conflicts: gcc-4.9:i386 but 4.9.2-10ubuntu13 is to be installed
     gcc-4.9:i386 : Depends: cpp-4.9:i386 (= 4.9.2-10ubuntu13) but it is not going to be installed
                    Depends: binutils:i386 (>= 2.25) but it is not going to be installed
                    Depends: libgcc-4.9-dev:i386 (= 4.9.2-10ubuntu13) but it is not going to be installed
                    Depends: libcloog-isl4:i386 (>= 0.17) but it is not going to be installed
                    Depends: libgmp10:i386 (>= 2:5.0.1~) but it is not going to be installed
                    Depends: libisl13:i386 (>= 0.10) but it is not going to be installed
                    Depends: libmpc3:i386 but it is not going to be installed
                    Depends: libmpfr4:i386 (>= 3.1.2) but it is not going to be installed
                    Recommends: libc6-dev:i386 (>= 2.13-0ubuntu6) but it is not going to be installed
                    Conflicts: gcc-4.9 but 4.9.2-10ubuntu13 is to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
por Mohsen Parsaeian 31.01.2016 / 19:50

1 resposta

1

O principal problema é:

Depends: libstdc++6 (>= 4.9) but 4.8.4-2ubuntu1~14.04 is to be installed

e a instalação da versão necessária falha

$ apt-get download libstdc++6
$ sudo dpkg -i libstdc++6_4.9.2-10ubuntu13_amd64.deb
...
dpkg: dependency problems prevent configuration of libstdc++6:amd64:
 libstdc++6:amd64 depends on gcc-4.9-base (= 4.9.2-10ubuntu13); however:
  Version of gcc-4.9-base:amd64 on system is 4.9.3-0ubuntu4.

A saída de apt-cache policy gcc-4.9-base me diz que você instalou gcc-4.9-base com um arquivo DEB ou por um repositório que não existe mais em seu sistema. Por esse motivo:

  1. Faça downgrade de sua instalação de gcc-4.9 e como você também instalou os pacotes de 32 bits, o mesmo para os pacotes de 32 bits.

    Mas os comandos abaixo não são úteis, por isso temos que seguir o caminho mais difícil, veja o ponto 2.

    sudo apt-get install gcc-4.9=4.9.2-10ubuntu13 gcc-4.9-base=4.9.2-10ubuntu13 gcc-4.9:i386=4.9.2-10ubuntu13 gcc-4.9-base:i386=4.9.2-10ubuntu13
    
  2. O caminho mais difícil

    mkdir ~/debs$$
    cd ~/debs$$
    wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-4.9/gcc-4.9-base_4.9.2-10ubuntu13_amd64.deb
    wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-4.9/gcc-4.9-base_4.9.2-10ubuntu13_i386.deb
    wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-4.9/gcc-4.9_4.9.2-10ubuntu13_amd64.deb
    wget http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-4.9/gcc-4.9_4.9.2-10ubuntu13_i386.deb
    sudo dpkg -i --force-all *.deb
    sudo apt-get install -f
    
  3. Instale aptitude

    sudo apt-get install aptitude
    
por A.B. 01.02.2016 / 15:06

Tags