"No Installation Candidate" when trying to install build-essential

apt-get install build-essential fails with the following errors:

~$ sudo apt-get install build-essential
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

I had just run sudo apt-get update before trying this install.

The folder /etc/apt/sources.list.d is empty. Here's the meat of /etc/apt/sources.list:

$ grep deb\ http: /etc/apt/sources.list #(with "deb http://" deleted) raring main restricted raring-updates main restricted raring universe raring-updates universe raring multiverse raring-updates multiverse raring-backports main restricted universe multiverse raring-security main restricted raring-security universe raring-security multiverse raring main 

This with ubuntu 13.04 64 bit.

apt-cache policy build-essential
build-essential: Installed: (none) Candidate: (none) Version table: 

The directory /etc/apt/sources.list.d is empty.

1

3 Answers

Problem solved. In Ubuntu Software Center >> Edit >> Software Sources, I changed the server to Main Server and then run sudo apt-get update. Then sudo apt-get install build-essential which worked.

0

With Command Line

If you want to solve this annoying problem using the command line. You should edit the file /etc/apt/source.list.

Add the line deb bionic main. Replacing with the mirror in question, depending on your geographical position, if your distribution is bionic. If not, put in the right one.

This worked for me

  1. Run sudo software-properties-gtk
  2. Under 'Ubuntu Software' tab select/tick the first 4 options- main, universe, restricted, multiverse

Softwares & Updates

  1. Click 'Close'
  2. Click 'Reload'

Now, try your install command again.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like