源码安装nginx报错,找不到gcc,但是实际上gcc是存在的,如下:
# ./configure checking for OS + Linux 3.10.0-957.el7.x86_64 x86_64 checking for C compiler ... not found ./configure: error: C compiler cc is not found #
尝试找寻gcc
# whereis gcc gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz #
尝试指定cc
# ./configure --with-cc=/usr/bin/gcc checking for OS + Linux 3.10.0-957.el7.x86_64 x86_64 checking for C compiler ... not found ./configure: error: C compiler /usr/bin/gcc is not found [root@localhost nginx-1.14.2]# ls -l /usr/bin/gcc -rwxr-xr-x. 2 root root 0 Mar 14 06:44 /usr/bin/gcc#
依旧报错
最后卸载gcc重新安装成功,不过,模拟不出这种环境了
# yum remove gcc -y # yum install gcc -y