标签归档:nrpe openssl

openssl的编译

问题:编译nrpe的时候,提示libssl找不到,但是inc文件可以找到,已经编译了openssl,并且成功,但就是找不到libssl
出错信息如下:
checking for socklen_t… yes
checking for type of socket size… size_t
checking for SSL headers… SSL headers found in /home/system/nagios
checking for SSL libraries… configure: error: Cannot find ssl libraries

解决:
ldconfig
ld.so.conf添加路径,还是失败
PKG_CONFIG_PATH路径添加,失败
DYLD_LIBRARY_PATH路径添加,失败

没辙了,后来再网上搜到这篇文章:
http://support.nagios.com/knowledgebase/faqs/index.php?option=com_content&view=article&id=52&catid=35&faq_id=449&expand=false&showdesc=true

说明了解决办法,如果e文不好,那么我解释一句,可能您就明白了
then Ok, but with some Openssl packages, the default is to build archive libraries. Shareable libraries must be explicitly asked with a configure option, –enable-shared. Or some developpers don’t wish to use a .so variant and prefer static linkage.
大概的意思是说,openssl这个包,默认的会编译出“存档库”,如果希望编译为“共享库”,需要在编译的时候添加enable-shared的选项,一些开发人员不喜欢使用.so的变体,更喜欢prefer static linkage,

呵呵,明白了,重新编译openssl,添加enable-shared选项,即可解决。

这是我编译openssl的选项:
./config –prefix=/home/system/nagios/ enable-shared –openssldir=/home/system/nagios/openssl