Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configure: error: no acceptable C compiler found in $PATH

I am trying to Build and Install the Apache Thrift compiler and libraries

I had to type this command is shown in instructions ./configure && make But I get this error:

checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/PATH/TO/thrift-0.9.3':
configure: error: no acceptable C compiler found in $PATH

When I type in my command prompt gcc --version I get this

gcc (GCC) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

It finds the gcc compiler. However, when I run it from my msys2 Shell

bash: gcc: command not found

The path in Environment variables is correct. C:\MinGW\bin

Yet it canno't find gcc

Thanks in advance!

like image 641
Tony Tannous Avatar asked Nov 22 '16 23:11

Tony Tannous


People also ask

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

Conclusion: 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 is installed on Linux?

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. Save this answer. Show activity on this post.


3 Answers

The path to your gcc compiler is not in the PATH.

You may add it before you run make.

export PATH=${PATH}:/c/MinGW/bin
./configure && make

Goodluck.

like image 64
alvits Avatar answered Oct 20 '22 06:10

alvits


I'm on Win10 OS

There is a Visual Studio project file for the compiler. Either use that one, or download the compiler binary for Windows directly from the website.

like image 44
JensG Avatar answered Oct 20 '22 05:10

JensG


If it is centos/redhat machine install full set of development package

$ sudo yum groups install "Development Tools"

it includes gcc,g++,make Id. After installing try again

like image 1
Rakib Avatar answered Oct 20 '22 04:10

Rakib