/usr/bin/ld: cannot find -lm 类似
3、
Linux下编译程序/usr/bin/ld: cannot find -l*错误的解决方法
https://blog.csdn.net/weixin_46386047/article/details/126098559
2、
Linux系统下查找安装包的方法
http://t.zoukankan.com/yyuuee-p-14461980.html
1、
在编译程序的时候出现编译错误!如下所示:
/usr/bin/ld: cannot find -lm
cannot find -lm问题根源在于:编译的时候用了“-static” 选项。
那么为什么出现这个问题呢?
因为现在的Linux中没有静态c库。
解决办法:
安装glibc-static 库就好了。
我的主机环境是RHEL6.5,安装命令如下所示:
yum install glibc-static