当前位置: 代码迷 >> 综合 >> configure编译时,出现 configure: error: C compiler cannot create executables错误解决 .
  详细解决方案

configure编译时,出现 configure: error: C compiler cannot create executables错误解决 .

热度:41   发布时间:2023-12-17 14:47:33.0

今天在服务器上安装bind9.9.2的时候,gcc和gcc-c++已经安装过了,但是./configure的时候还是报错:

   checking build system type... x86_64-unknown-linux-gnu
   checking host system type... x86_64-unknown-linux-gnu
   checking whether make sets $(MAKE)... yes
   checking for gcc... gcc
   checking whether the C compiler works... no
   configure: error: in `/tmp/bind-9.9.2':
   configure: error: C compiler cannot create executables
   See `config.log' for more details


有很多人建议重装GCC,但是确无济于事。

解决方法:

在linux的命令行中,输入下面的两行,清空CFLAGS和LIBS的值:

export LIBS=

export CFLAGS=

然后,就再运行./configue 等时,就可以正常通过了。

  相关解决方案