[Solved] linux configure: error: no acceptable C compiler found in $PATH

preface

When installing PgSQL on linux, execute /Configure -- prefix =/usr/local/PgSQL error, the same as the following:

[root@instance-0qymp8uo postgresql-14.1]# ./configure --prefix=/usr/local/pgsql
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking which template to use... linux
checking whether NLS is wanted... no
checking for default port number... 5432
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for gcc... no
checking for cc... no
configure: error: in `/root/postgresql-14.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

The reason for the error here is that we can’t find a suitable C compiler. We need to update GCC

./Configure is used to detect the target characteristics of your installation platform. This step is used to generate makefile to prepare for the next compilation. – prefix = is the specified software installation directory. You can set the configuration files of some software by specifying the – sys config = parameter. Some software can also add parameters such as – with, – enable , – without, – disable to control compilation. You can allow /Configure – help View detailed help instructions.

Solution:

Centos

 yum install gcc

Ubuntu

apt-get install gcc

Similar Posts: