apt - Not able to install gcc and g++ - Ask Ubuntu


i have rm-r files starting gcc , g++ /usr/bin..

now when trying reinstall using sudo apt-get install gcc getting following error

reading package lists... done building dependency tree        reading state information... done gcc newest version (4:5.3.1-1ubuntu1). following packages automatically installed , 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' remove them. 0 upgraded, 0 newly installed, 0 remove , 0 not upgraded. 1 not installed or removed. after operation, 0 b of additional disk space used. want continue? [y/n] y setting 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 encountered while processing:  gcc e: sub-process /usr/bin/dpkg returned error code (1) 

install metapackage called build-essential should install compiler , bunch of related/needed packages:

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

from output above, use:

sudo apt-get autoremove 

to remove packages no longer required.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User