configure错误:“C compiler cannot create executables“

执行./configure命令出现如下奇怪的错误,百思不得姐:

在这里插入图片描述

./configure命令的日志文件为config.log,发生错误时,该文件的内容:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:538: checking for gcc
configure:615: checking whether the C compiler (gcc  ) works
configure:629: gcc -o conftest    conftest.c  1>&5
configure:626:1: error: return type defaults to 'int' [-Wimplicit-int]
  626 | main(){return(0);}
      | ^~~~
configure: failed program was:
#line 625 "configure"
#include "confdefs.h"
main(){return(0);}

继续查看configure文件:

在这里插入图片描述

在main()函数前加"int",执行./configure,ok!搞定!

在这里插入图片描述

别急!还有,学到了什么?linux上的开发错误,除了一些常见的,很多错误需要自己找原因,你就是一个完整的OS!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值