Não é possível instalar o gcc e g ++

0

Eu tenho rm-r de todos os arquivos que começam com gcc e g++ do meu /usr/bin ..

Agora, quando estou tentando reinstalá-lo usando sudo apt-get install gcc , estou recebendo o seguinte erro

Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version (4:5.3.1-1ubuntu1).
The following packages were automatically installed and are no longer required:
  libgcrypt20:i386 libsystemd0:i386 linux-headers-4.4.0-38 linux-headers-4.4.0-38-generic
  linux-image-4.4.0-38-generic linux-image-extra-4.4.0-38-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up gcc (4:5.3.1-1ubuntu1) ...
update-alternatives: error: alternative path /usr/bin/gcc doesn't exist
dpkg: error processing package gcc (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 gcc
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por Henil Naik 23.10.2016 / 06:45

1 resposta

0

Instale o metapacote chamado build-essential que deve instalar o compilador e um monte de pacotes relacionados / necessários:

sudo apt-get update
sudo apt-get install build-essential

Da sua saída acima, use:

sudo apt-get autoremove

Para remover pacotes que não são mais necessários.

    
por Benny 23.10.2016 / 07:07