linux下编译代码遇到“/usr/bin/ld: cannot find -lcrypto”的问题
1. 问题:/usr/bin/ld: cannot find -lcrypto
- 问题描述:在Linux下build code时,若要进行-lssl或-lcrypto的链接时,可能会出现以下错误:
(1)/usr/bin/ld: cannot find -lcrypto
(2)/usr/bin/ld: cannot find -lssl
- 注:原因是因为没有找到libssl.so或libcrypto.so。
2. 进入/usr/lib64文件夹,查看lib64里是否有libcrypto.so文件
3. 如果没有上述文件,就添加该文件的软链接
4. 重新编译,问题解决,编译通过
参考文献:
[1] 百度搜索关键字:/usr/bin/ld: cannot find -lcrypto
[2] 具体网址:http://blog.csdn.net/yasi_xi/article/details/8658191