4

I'm trying to install VM Player on Ubuntu 14.04.1 LTS.

I've seen threads for earlier versions of Ubuntu that say to install build-essential and linux headers first. It appears that linux headers is already the newest version. However build-essential will not install for me.

sudo apt-get install build-essential

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package build-essential

Is there something I am missing here? Thank you in advance for your help.

marked as duplicate by Pandya, Braiam, Eric Carvalho, Kaz Wolfe, Eliah Kagan Sep 9 '14 at 20:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Can you edit your question and paste in the contents of /etc/apt/sources.list? – saiarcot895 Sep 7 '14 at 0:22
12

build-essential is available on Main repository for 14.04. So first enable repository.

The main component contains applications that are free software, can be freely redistributed and are fully supported by the Ubuntu team. & The universe component is a snapshot of the free, open-source, and Linux world.

You can enable Main & Universe repository by following command:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe"

Then install package by following command in terminal:

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

Try to run this commands in terminal, one by one:

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
  • That is not going to resolve missing dependencies. – Panther Sep 7 '14 at 0:41
  • 1
    @bodhi.zazen An "Unable to locate package..." error is not a missing dependencies problem. It can occur as part of dependency resolution, but that's not what's happening here, going by the OP's error messages. – Eliah Kagan Sep 9 '14 at 20:37
  • @bodhi.zazen The sudo apt-get update line very well could, by itself, fix a problem presenting like this, under some circumstances. The question notably does not mention that having been run. As an added benefit, visitors who see these comments will now have the correct explanation as well. – Eliah Kagan Sep 9 '14 at 20:44
  • @bodhi.zazen Pandya's answer is accepted and seems to have fixed the problem. I think my comment there clarifies things well enough. I thought of editing instead, but decided that might be seen as a radical change. If Pandya chooses to edit, there'll be even less need for another answer. Anyway, I think we were right to close this as a duplicate of a more general question. If this is reopened I may consider posting an answer. (I hadn't actually spent much time on this... except this comment, which I considered not posting. But I appreciate your concerns and I figured I should reply to them.) – Eliah Kagan Sep 9 '14 at 21:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.