no acceptable C compiler found in $PATH

Asked by Ben Larisch

I am in the process of building a Nagios server. I just installed Ubuntu 8.04 LTS Server selecting the defaults. when it came to running the Nagios configure script "./configure --with-command-group=nagcmd" I get "no acceptable C compiler found in $PATH". I checked to make sure gcc was installed and I also ran "sudo aptitude install build-essential" just to make sure I had a compiler. I still get the error... any Ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Ben Larisch
Solved:
Last query:
Last reply:
Revision history for this message
Ben Larisch (blarisch) said :
#1

OK, I just ran "sudo aptitude install build-essential" again this is what I got. I don't think it installed...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
Couldn't find any package whose name or description matched "build-essential"
Couldn't find any package whose name or description matched "build-essential"
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Reading package lists... Done
Building dependence tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done

after seeing this I ran "find / -name gcc" and it returned "/usr/lib/gcc
I would assume this means that gcc is installed and I should be able to compile but...
thanks in advance I am fresh to linux and your help in much appreciated.

Revision history for this message
Steven Danna (ssd7) said :
#2

What is the output of the following commands:

echo $PATH
which gcc

Revision history for this message
Ben Larisch (blarisch) said :
#3

Echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

Which gcc
Returned nothing, does this mean it's not installed?

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Steven Danna
Sent: Tuesday, July 14, 2009 2:38 PM
To: Ben Larisch
Subject: Re: [Question #76983]: no acceptable C compiler found in $PATH

Your question #76983 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/76983

    Status: Open => Needs information

Steven Danna requested for more information:
What is the output of the following commands:

echo $PATH
which gcc

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/ubuntu/+question/76983

You received this question notification because you are a direct
subscriber of the question.

NOTICE OF CONFIDENTIALITY: This message and its attachments are intended solely for the use of the addressee(s) and may contain information that is confidential, privileged and exempt from disclosure. If you are not an intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this email transmission. Delivery of this message to any person other than the intended recipient is not intended to waive any right or privilege. If you have received this message in error, please promptly notify the sender by reply email and immediately delete this message from your system.

Revision history for this message
Steven Danna (ssd7) said :
#4

"Which gcc
Returned nothing, does this mean it's not installed?"

Maybe. What is the output of:

sudo apt-cache policy gcc

Also, try this:

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

If you didn't run an update before trying to install, it wouldn't know where to look for the package.

Revision history for this message
Ben Larisch (blarisch) said :
#5

That worked, and it looks like everything is running just fine now.
Thanks for your help :-)