• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

configure:error:Ccompilercannotcreateexecutables

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

最近搞坏了ubuntu,大半夜装好公司的电脑-limint系统,第二天早晨编译 ./configure出错configure: error: C compiler cannot create executables

很是无语呀,找了很多解决办法:

1,

Having a compiler (like gcc) is not enough to compile C programs, you also need a C library. If it is missing, you will experience the (somewhat obscure) error message:

configure: error: C compiler cannot create executables

You may fix this by installing libc6-dev and linux-libc-dev packages. After you install them, simply rerun ./configure.

没有效果!

2,

You can test this by compiling a small C example with the -m32 flag.

// Minimal C example
#include <stdio.h>
int main()
{
   printf("This works\n");
   return 0;
}

Compiling:

gcc -m32 -o m32test m32test.c
确实也没有通过!

3,

Logs don't lie! configure.log is what i need to get to the root of the problem. The issue is this:

      gcc checking whether the C compiler works... no

The simple answer to this is just

sudo apt-get install clang && rvm install 1.9.3 --with-gcc=clang
这是解释:ask:it would be interesting to know why GCC didn't work
answer:GCC doesn't work for me either. Clang works though.
这个方法好使!
另外还有一个方法没有试试:
ln -s /usr/bin/gcc /usr/bin/gcc-apple-4.2

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++Input&amp;Output发布时间:2022-07-14
下一篇:
c#字符串分割发布时间:2022-07-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap