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

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

/usr/bin/ld: cannot find -lc

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

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


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

解决:安装静态库

#sudo  yum install glibc-static

posted @ 2015-04-01 11:01  phlsheji  阅读(530)  评论(0编辑  收藏  举报