Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does configure say no C compiler found when GCC is installed?

I am trying to make Sphinx from source on a 32-bit CentOS 6 VPS.

When I run this command:

./configure --prefix=/usr/local/sphinx 

I get this error output:

checking build environment --------------------------  checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no  checking for compiler programs ------------------------------  checking whether to compile debug version... no checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/home/gnotes/sphinx': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. 

What I don't understand is that GCC is installed so why can't configure find an acceptable C compiler?

Here's the output of yum:

sudo yum install gcc  Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile  * base: mirror.metrocast.net  * extras: centos.mirror.constant.com  * updates: mirror.lug.udel.edu base                                                                                                                                                                      | 3.7 kB     00:00      extras                                                                                                                                                                    | 3.5 kB     00:00      updates                                                                                                                                                                   | 3.4 kB     00:00      Setting up Install Process Package gcc-4.4.7-3.el6.i686 already installed and latest version Nothing to do 

What gives?

like image 805
Garry Pettet Avatar asked Aug 06 '13 09:08

Garry Pettet


People also ask

How do I fix configure error no acceptable C compiler found in path?

If you ever get an error 'no acceptable C compiler found' while compiling OpenCA or any package, then the issue can be fixed by installing a C compiler (GCC or any appropriate compiler) and setting the path of the compiler in environment variable. Hope it helps.

How do I know if gcc compiler is installed?

In the Command Prompt window type “gcc” and hit enter. If the output says something like “gcc: fatal error: no input files”, that is good, and you pass the test.

Why C compiler is not working?

This usually happens when you don't have C/GCC compiler installed on your server. All you got to do is to install gcc to resolve this. If using CentOS 8 then you can use the DNF command. Once installed, you can verify as below.


Video Answer


2 Answers

try yum groupinstall "Development Tools"

if the installation is success then you will have a full set of development tools. Such as gcc, g++, make, ld ect. After that you can try the compilation of Code Blocks again.

Since yum is deprecated you can use dnf instead:

dnf groupinstall "Development Tools" 
like image 160
kds Avatar answered Sep 18 '22 11:09

kds


Install GCC in Ubuntu Debian Base

sudo apt-get install build-essential 
like image 40
Lakshmikandan Avatar answered Sep 20 '22 11:09

Lakshmikandan