【案例:A】
因为错误设置环境变量,gcc坏掉了
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.
参考:http://blog.csdn.net/weiyidemaomao/article/details/7742605
因为刚才导致出问题的2个环境变量是 CFLAGS 和 LIBS :
unset CFLAGS && unset LIBS
【案例:B】
如果之前有执行过:
export CFLAGS="-std=c99"
可以执行以下命令取消:
export CFLAGS=""