【已解决】/usr/bin/ld: cannot find crti.o: No such file or directory 和 /usr/bin/ld: cannot find -lc

前言

创作开始时间:2021年7月3日08:56:55

如题,在运行./configure的时候出现了这样的错误。这里给出解决方案。

问题描述

环境:

  • ubuntu 16.04

在运行:

wget -q http://pyyaml.org/download/libyaml/yaml-0.1.7.tar.gz \
      && sudo tar xvf yaml-0.1.7.tar.gz -C /usr/local \
      && cd /usr/local/yaml-0.1.7 \
      && sudo ./configure \

的时候,报错了,说是:

configure: error: C compiler cannot create executables

解决方案

1、迷茫期

拿着这个error message去查,

完全get不到解决方案

2、找到解决方案

所以只能继续研究,发现可以查看config.log,进去细细查看,发现有如下错误:

/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status

于是去查:/usr/bin/ld: cannot find crti.o: No such file or directory

找到了参考:

3、具体解决方案

运行:

sudo apt-get install libc6-dev

然后重新运行configure就可以了。

小结

以上。还是需要经历一些曲折的。问题不大。

创作结束时间:2021年7月3日09:19:59

  • 4
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值