sudo apt-get install build-essential not working.

Asked by shailesh

I am unable to run sudo apt-get install build-essential.
It displayed:
[sudo] password for shailesh:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package build-essential has no installation candidate

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

hello Shailesh

add the CD Rom repo in

system > administration > software sources

and tick the CD Rom checkbox click on reload and try again...

Regards

Revision history for this message
shailesh (shaileshagarwal1) said :
#2

Simply some files downloading started and without completing some error occured.
If i have gone to install software through add/remove and click on any of the software for installation it asks for confirmation and then for enable and then same files started downloading as in the case of reload and the same result.

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#3

This are a lot and clean of package cache

Open a Terminal from the menu Applications → Accessories → Terminal and type:

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install build-essential
sudo apt-get clean
sudo apt-get autoremove

give your user password when requested, you don't see nothing when you type it, then press enter.

Hope this helps

Revision history for this message
shailesh (shaileshagarwal1) said :
#4

Thanks marcobra, that solved my question.

Revision history for this message
abela (abelbelete) said :
#5

wow, it was very helpful and every thing is working well. Thank you very much!

Revision history for this message
Ed Mallett (lowbird) said :
#6

Thanks marcobra!!
I had a similiar problem - invalid operation build-essential.
Following your instructions worked successfully!!
TYVM!!