Não é possível instalar o build-essential no ubuntu 16.04 [closed]

0

Estou tentando instalar o pacote build-essential no Ubuntu 16.04 (Xenial Xerus), mas há um problema de dependência.

root@server:~# 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.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: gcc (>= 4:5.2) but it is not going to be installed
                   Depends: g++ (>= 4:5.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

e quando eu tentei,

root@server:~# apt-get install libc6-dev
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:
 libc6-dev : Depends: libc6 (= 2.23-0ubuntu2) but 2.23-0ubuntu3 is to be installed
E: Unable to correct problems, you have held broken packages.

e também;

root@server:~# apt-cache policy libc6-dev
libc6-dev:
  Installed: (none)
  Candidate: 2.23-0ubuntu2
  Version table:
     2.23-0ubuntu2 500
        500 http://tr.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

root@server:~# apt-cache policy gcc
gcc:
  Installed: (none)
  Candidate: 4:5.3.1-1ubuntu1
  Version table:
     4:5.3.1-1ubuntu1 500
        500 http://tr.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

root@server:~# apt-cache policy g++
g++:
  Installed: (none)
  Candidate: 4:5.3.1-1ubuntu1
  Version table:
     4:5.3.1-1ubuntu1 500
        500 http://tr.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
    
por ecabuk 22.04.2016 / 17:15

2 respostas

3

O repositório turco tem alguns problemas. Você pode alterar o arquivo /etc/apt/sources.list.

substitua todas as linhas link para link

e execute o sudo apt-get update; sudo apt-get upgrade

    
por Taner Kaderli 25.04.2016 / 16:34
1
% bl0ck_qu0te%

libc6 e libc6-dev precisam ser a mesma versão, mas a versão do libc6-dev encontrada nos espelhos que o apt está configurado para usar é mais antiga que a libc6 em seu sistema e o apt normalmente não faz o downgrade dos pacotes.

Neste caso, parece que o seu problema é um espelho desatualizado (2.23-0ubuntu3 está no xenial há mais de uma semana). Sugiro mudar sua sources.list para apontar em um espelho diferente.

Você também pode se deparar com esse problema quando alguém altera o arquivo sources.list para uma versão mais recente, instala algumas coisas e as altera de volta, mas nesse caso você normalmente veria uma diferença de versão maior.

    
por Peter Green 25.04.2016 / 18:47