码迷,mamicode.com
首页 > 其他好文 > 详细

【解决】/usr/bin/ld: cannot find -lc

时间:2015-04-01 13:10:58      阅读:124      评论:0      收藏:0      [点我收藏+]

标签:

现象:运行gcc静态编译程序时报错:

/usr/bin/ld: cannot find -lc

collect2: ld returned 1 exit status
make: *** [gcc_dry2] Error 1

(或者调用Makefile编译时报错)


原因:程序链接须要静态库,系统没有安装静态库导致报错

解决:安装静态库

#sudo  yum install glibc-static

【解决】/usr/bin/ld: cannot find -lc

标签:

原文地址:http://www.cnblogs.com/bhlsheji/p/4383297.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!