暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

【故障】libssl包版本兼容故障

最帅dba工作笔记 2018-09-13
5071

【故障】libssl包版本出现问题

最近小编工作太繁忙,更新有些拖延,希望大家理解。最近每天接触很多国产的操作系统,比如:中标麒麟,银河麒麟,湖南麒麟,深度系统,凝思……等等等,在各种环境下适配数据库,遇到了很多关于系统兼容的问题,所以我想记录下来,大家如果有遇到,可以直接从我这里看。

低版本的linux系统,内核一般是2.6.32-642.el6.x86_64的,在安装高版本的mongo,pxc,pg的时候可能会出现这个问题,libssl是嵌套在openssl下的一个依赖包,大致报错如下:

[uxdb@test bin]$ ./initdb -D home/uxdb/uxtest -W

/home/uxdb/uxdbinstall/dbsql/bin/uxdb: relocation error: home/uxdb/uxdbinstall/dbsql/bin/uxdb: symbol SSL_COMP_free_compression_methods, version libssl.so.10 not defined in file libssl.so.10 with link time reference

no data was returned by command ""/home/uxdb/uxdbinstall/dbsql/bin/uxdb" -V"

The program "uxdb" is needed by initdb but was not found in the

same directory as "/home/uxdb/uxdbinstall/dbsql/bin/initdb".

Check your installation.

./initdb: relocation error: ./initdb: symbol SSL_COMP_free_compression_methods, version libssl.so.10 not defined in file libssl.so.10 with link time reference

在高版本(3.10.0-862.el7.x86_64),左右的时候,挂载高版本的yum 源没有问题,通过yum升级openssl到OpenSSL 1.0.2k-fips 即可。

但是低版本的openssl当中。如果通过yum源安装的话会导致有大量的关联包更新,这样可能会导致版本差异出现问题。

解决方法

使用openssl数据包:

wget https://www.openssl.org/source/openssl-1.0.2.tar.gz

tart -xvf openssl-1.0.2.tar.gz

配置安装

./config -fPIC --prefix=/usr/local/openssl/ enable-shared

--prefix是对应的安装目录,这里我为了不和之前的产生冲突,放在其他目录当中。

编译安装

make && make install

此时需要配置环境变量

echo "export PATH=$PATH:/usr/local/openssl/bin"  >>/etc/profile

source /etc/profile

mv /usr/bin/openssl /usr/bin/opensslold    这里一定要配置。

ldconfig 

配置库文件

echo "include /usr/local/openssl/lib" >> /etc/ld.so.conf

ldconfig

查看版本

openssl version

OpenSSL 1.0.2 22

这里如果版本太高也不行,可能会导致/lib64/lib包出现不必配的现象,所以此时一定注意,如果还出现故障,可以在一台高版本的服务器上,将对应的包下下来,放到这台服务器上试试,在/lib64/下大部分的包都是软连接出来的,找到对应的包即可。!!!!


THAT'S ALL

BY CUI PEACE!!!



本文分享自微信公众号 - 最帅dba工作笔记,如有侵权,请联系 service001@enmotech.com 删除。
文章转载自最帅dba工作笔记,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论