configure: error: no acceptable C compiler found in $PATH 错误解决

项目场景:

在Linux系统下使用命令解压安装 keepalived 源码包。


问题描述:

安装 keepalived 源码包,已经运行了以下命令:

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

前两个命令运行正常,第三个命令运行结果为:

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

原因分析:

出现该错误主要原因是没有C编译器。


解决方案:

安装C编译器:

yum -y install gcc

重新运行命令./configure --prefix=/usr/local/keepalived,命令运行正常,问题解决。

如果出现其他错误请参考:
configure: error: !!! OpenSSL is not properly installed on your system. !!! 错误解决
WARNING - this build will not support IPVS with IPv6. 警告解决

猜你喜欢

转载自blog.csdn.net/baidu_41847368/article/details/115075175
今日推荐