[linux] 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?

This question is related to linux gcc terminal sphinx yum

The answer is


Try specifying CC while configuring:

CC=/usr/bin/gcc ./configure --prefix=/usr/local/sphinx

Also check if your compiler produces executables. The following should produce an a.out:

echo "int main(){0;}" | gcc -x c -

Maybe gcc is not in your path? Try finding gcc using which gcc and add it to your path if it's not already there.


Install GCC in Ubuntu Debian Base

sudo apt-get install build-essential

i have same problem at the moment. I just run yum install gcc


The below packages are also helps you,

yum install gcc glibc glibc-common gd gd-devel -y

Sometime gcc had created as /usr/bin/gcc32. so please create a ln -s /usr/bin/gcc32 /usr/bin/gcc and then compile that ./configure.


I had the same issue with mind. I tried using sudo apt-get install build-essential It still won't work. I simply created a hardlink to the gcc-x binary in the /usr/bin/ folder. sudo ls /usr/bin/gcc-x /usr/bin/gcc

That worked for me!


Examples related to linux

grep's at sign caught as whitespace How to prevent Google Colab from disconnecting? "E: Unable to locate package python-pip" on Ubuntu 18.04 How to upgrade Python version to 3.7? Install Qt on Ubuntu Get first line of a shell command's output Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running? Run bash command on jenkins pipeline How to uninstall an older PHP version from centOS7 How to update-alternatives to Python 3 without breaking apt?

Examples related to gcc

Can't compile C program on a Mac after upgrade to Mojave Compiling an application for use in highly radioactive environments Make Error 127 when running trying to compile code How to Install gcc 5.3 with yum on CentOS 7.2? How does one set up the Visual Studio Code compiler/debugger to GCC? How do I set up CLion to compile and run? CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found How to printf a 64-bit integer as hex? Differences between arm64 and aarch64 Fatal error: iostream: No such file or directory in compiling C program using GCC

Examples related to terminal

Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Can't compile C program on a Mac after upgrade to Mojave Flutter command not found VSCode Change Default Terminal How to switch Python versions in Terminal? How to open the terminal in Atom? Color theme for VS Code integrated terminal How to edit a text file in my terminal How to open google chrome from terminal? Switch between python 2.7 and python 3.5 on Mac OS X

Examples related to sphinx

Why does configure say no C compiler found when GCC is installed? ElasticSearch, Sphinx, Lucene, Solr, Xapian. Which fits for which usage? Comparison of full text search engine - Lucene, Sphinx, Postgresql, MySQL?

Examples related to yum

How to Install gcc 5.3 with yum on CentOS 7.2? Completely remove MariaDB or MySQL from CentOS 7 or RHEL 7 RHEL 6 - how to install 'GLIBC_2.14' or 'GLIBC_2.15'? CentOS 7 and Puppet unable to install nc How to yum install Node.JS on Amazon Linux yum error "Cannot retrieve metalink for repository: epel. Please verify its path and try again" updating ContextBroker How to install latest version of git on CentOS 7.x/6.x Upgrading PHP on CentOS 6.5 (Final) Yum fails with - There are no enabled repos. Why does configure say no C compiler found when GCC is installed?