checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/root/mod_gnutls-0.7.5': configure: error: C compiler cannot create executables See `config.log' for more details
In my case, the issue is due to the customized LDFLAGS. I was compiling one of python packages. Because my python is installed in a customized location, I had to temporarily set the LDFLAGS variable env. As soon as I unset this env variable, the problem went away. So FYI.
因为刚才导致出问题的2个环境变量是 CFLAGS 和 LIBS ：
unset CFLAGS && unset LIBS