Problema ao instalar o build-essential e atualizar o g ++ no Ubuntu 8.04

2

Estou tendo problemas com dependências, mas não sei como resolver o problema. Aqui está a saída:

~:) sudo apt-get install build-essential
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.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  build-essential: Depends: g++ (>= 4:4.3.1) but 4:4.2.3-1ubuntu6 is to be installed
E: Broken packages
~:) sudo apt-get install g++
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.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  g++: Depends: cpp (>= 4:4.3.1-1ubuntu2) but 4:4.2.3-1ubuntu6 is to be installed
       Depends: gcc (>= 4:4.3.1-1ubuntu2) but 4:4.2.3-1ubuntu6 is to be installed
       Depends: g++-4.3 (>= 4.3.1-1) but it is not going to be installed
       Depends: gcc-4.3 (>= 4.3.1-1) but it is not installable
E: Broken packages
~:) 

Edit: Eu tentei o aptitude em vez do apt-get, como sugerido. Não funciona, teve outros problemas:

~:) sudo aptitude install build-essential
[sudo] password for ehsanul: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Building tag database... Done      
The following packages are BROKEN:
  g++ g++-4.3 libstdc++6-4.3-dev 
The following packages have been automatically kept back:
  dpkg-dev fakeroot libdns35 libisc35 linux-libc-dev patch 
The following NEW packages will be automatically installed:
  libgmp3c2 libmpfr1ldbl 
The following packages have been kept back:
  adobe-flashplugin bind9-host dnsutils gvfs gvfs-backends gvfs-fuse 
  libatm1 libbind9-30 libgvfscommon0 libisccc30 libisccfg30 liblwres30 
  libnautilus-extension1 linux-headers-2.6.24-24 
  linux-headers-2.6.24-24-generic linux-image-2.6.24-24-generic nautilus 
  nautilus-data 
The following NEW packages will be installed:
  libgmp3c2 libmpfr1ldbl 
The following packages will be upgraded:
  build-essential 
The following partially installed packages will be configured:
  timidity 
2 packages upgraded, 4 newly installed, 0 to remove and 24 not upgraded.
Need to get 775kB/6265kB of archives. After unpacking 20.3MB will be used.
The following packages have unmet dependencies:
  libstdc++6-4.3-dev: Depends: gcc-4.3-base (= 4.3.2-1ubuntu11) which is a virtual package.
                      Depends: libstdc++6 (>= 4.3.2-1ubuntu11) but 4.2.4-1ubuntu4 is installed.
  g++-4.3: Depends: gcc-4.3-base (= 4.3.2-1ubuntu11) which is a virtual package.
           Depends: gcc-4.3 (= 4.3.2-1ubuntu11) which is a virtual package.
           Depends: libc6 (>= 2.8~20080505) but 2.7-10ubuntu4 is installed.
  g++: Depends: cpp (>= 4:4.3.1-1ubuntu2) but 4:4.2.3-1ubuntu6 is installed.
       Depends: gcc (>= 4:4.3.1-1ubuntu2) but 4:4.2.3-1ubuntu6 is installed.
       Depends: gcc-4.3 (>= 4.3.1-1) which is a virtual package.
Resolving dependencies...
The following actions will resolve these dependencies:

Keep the following packages at their current version:
build-essential [11.3ubuntu1 (hardy, now)]
g++ [4:4.2.3-1ubuntu6 (hardy-updates, now)]
g++-4.3 [Not Installed]
libstdc++6-4.3-dev [Not Installed]

Score is -9852

Accept this solution? [Y/n/q/?] 
    
por ehsanul 31.07.2009 / 02:09

5 respostas

3

Parece que os repositórios estão desarrumados para mim. O Ubuntu 8.04 LTS não possui o GCC 4.3.x, apenas 4.2.xe não foi portado novamente. Tente inspecionar o /etc/apt/sources.list para encontrar qualquer repositório não resistente que esteja por aí.

    
por 01.08.2009 / 12:01
5

Tente usar o aptitude em vez disso, pode ser um pouco mais inteligente ao lidar com as dependências de pacotes.

sudo aptitude update && aptitude install build-essential

atualização

Eu fiz algumas pesquisas e descobri que a solução acima funcionava para pelo menos uma outra pessoa que estava tendo o mesmo problema. (veja o final da discussão)

Link: link

    
por 31.07.2009 / 02:22
1

Eu sigo a sugestão do /etc/apt/sources.list. Você pode postar o seu? Meu primeiro palpite é que algo está quebrado lá.

    
por 06.08.2009 / 01:46
1

Também teve esse problema. Eu descobri que eu estraguei meus /etc/apt/sources.list e / etc / apt / preferences. Corrigir esses arquivos fez o truque.

    
por 28.06.2013 / 11:10
0

Eu não executo mais nenhuma caixa 8.04, mas parece que você precisa ter o gcc-4.3 instalado antes de permitir que você continue. Você obtém algum resultado de "apt-cache search gcc-4.3" ou "sudo apt-get install gcc-4.3"?

O que seus arquivos /etc/apt/sources.list e /etc/apt/sources.list.d/* contêm? Você tem universo ou multiverso assim como o principal listado? Você tem o backports repo habilitado também?

Dando uma olhada rápida em alguns dos arquivos Package.gz para hardy eu não vi nada para o gcc-4.3, mas eu não olhei muito longe porque eu não sei quais repos e dists você está usando.

Boa sorte

    
por 01.08.2009 / 05:43