Configure error: no acceptable C compiler found in $PATH

Updated on November 2, 2017

Do you get an error “no acceptable C compiler found” while compiling OpenCA from source? If yes, here’s a fix for it.

configure: error: in `/home/openra/openca-base-1.5.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

Fix compilation error : no acceptable C compiler found in $PATH

The error is due to missing C compiler or the compilation script could not find one in $PATH variable. So the first thing is to check if you have C compiler installed. In most cases, it will be GNU C compiler.

Run the below command to check if you have GCC installed.

$ rpm -qa | grep gcc

Don’t have one? Then install GCC using the below command.


You need root privileges to install GCC.

How to install GCC on RHEL/CentOS/Ubuntu/Debian


# yum install gcc


# apt-get install gcc

Once you install, run the below command:


# yum groupinstall "Development tools"


# apt-get install build-essential

Install from source: (Ignore this step, if you chose to install via yum/apt-get)

You can also compile GCC from source and install it.

Now the GCC is installed, try compiling OpenCA. In case, if you choose to install GCC from source, then make sure the path of gcc is set in the environment variable.

# export PATH=$PATH:<gcc command 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.

Was this article helpful?

Related Articles

Leave a Comment