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

源碼安裝nginx報錯,找不到gcc,可是實際上gcc是存在的,以下:nginx

# ./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

# 

 

嘗試找尋gccspa

# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz
# 

 

嘗試指定cccode

# ./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# 

依舊報錯blog

 

最後卸載gcc從新安裝成功,不過,模擬不出這種環境了rem

# yum remove gcc -y
# yum install gcc -y 
相關文章
相關標籤/搜索