Configuration: error: no acceptable C compiler found in $path

Project scenario:

In Linux system, use the command to decompress and install the keepalived source package.


Problem Description:

To install the keepalived source code package, you have run the following command:

tar -xzvf keepalived-2.2.2.tar.gz
cd keepalived-2.2.2
./configure --prefix=/usr/local/keepalived

The first two commands run normally, and the third command runs as follows:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/software/keepalived-2.2.2':
configure: error: no acceptable C compiler found in $PATH

Cause analysis:

The main reason for this error is that there is no c compiler.


Solution:

To install the C compiler:

yum -y install gcc

Rerun the command ./configure -- prefix =/usr/local/kept , the command runs normally, and the problem is solved.

If there are other errors, please refer to:
configure: error:!! OpenSSL is not properly installed on your system.!! Error resolution
warning - this build will not support IPVS with IPv6

Read More: