1. 程式人生 > >nginx報錯:./configure: error: C compiler cc is not found, gcc 是已經安裝了的

nginx報錯:./configure: error: C compiler cc is not found, gcc 是已經安裝了的

x86 config bin share install 嘗試 found clas error:

源碼安裝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

[[email protected] 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 

nginx報錯:./configure: error: C compiler cc is not found, gcc 是已經安裝了的