【解决openGauss安装后yum、ssh命令无法使用】
- 🔻 一、操作系统及数据库版本
- 🔰 1.1 操作系统版本
- 🔰 1.2 openGauss数据库版本
- 🔻 二、关于openGauss安装
- 🔻 三、问题详情
- 🔰 3.1 使用yum命令报错
- 🔰 3.2 使用ssh命令报错
- 🔰 3.3 问题分析
- 🔰 3.4 问题解决
- 🔰 3.4.1 解决方案一
- 🔰 3.4.2 解决方案二
- 🔰 3.4.3 方案三不能解决,看前两个即可--安装完,检查还是无`EVP_md2`
- 🔻 四、总结—温故知新
👈【上一篇】 | 💖The Begin💖 点点关注,收藏不迷路💖 | 【下一篇】👉 |
🔻 一、操作系统及数据库版本
🔰 1.1 操作系统版本
统信uos-server-20-1060e
🔰 1.2 openGauss数据库版本
openGauss_5.0.0 企业版
🔻 二、关于openGauss安装
🍀omm用户-----用于运行和维护openGauss数据库,在安装时有两种方式建立该用户。
1、安装过程自动创建初始用户—omm和dbgrp用户组(小编使用的这种方式---所以导致openGauss安装后yum、ssh命令无法使用,下面详细介绍了解决方案
)。
2、先创建omm和dbgrp用户组-----则不会产生yum、ssh命令无法使用
。
groupadd -g 5001 dbgrp
useradd -u 5001 -g dbgrp omm
chown -R omm:dbgrp /opt
🔻 三、问题详情
🔰 3.1 使用yum命令报错
ImportError: /usr/lib64/libldap-2.4.so.2: symbol EVP_md2 version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time reference
。
----缺少了EVP_md2库文件
。
[root@klgdj ~]# clear
[root@klgdj ~]# yum list
Traceback (most recent call last):File "/usr/lib64/python3.7/site-packages/libdnf/error.py", line 14, in swig_import_helperreturn importlib.import_module(mname)File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 1006, in _gcd_importFile "<frozen importlib._bootstrap>", line 983, in _find_and_loadFile "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 670, in _load_unlockedFile "<frozen importlib._bootstrap>", line 583, in module_from_specFile "<frozen importlib._bootstrap_external>", line 1043, in create_moduleFile "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /usr/lib64/libldap-2.4.so.2: symbol EVP_md2 version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time referenceDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "/usr/bin/yum", line 57, in <module>from dnf.cli import mainFile "/usr/lib/python3.7/site-packages/dnf/__init__.py", line 30, in <module>import dnf.baseFile "/usr/lib/python3.7/site-packages/dnf/base.py", line 29, in <module>import libdnf.transactionFile "/usr/lib64/python3.7/site-packages/libdnf/__init__.py", line 8, in <module>from . import errorFile "/usr/lib64/python3.7/site-packages/libdnf/error.py", line 17, in <module>_error = swig_import_helper()File "/usr/lib64/python3.7/site-packages/libdnf/error.py", line 16, in swig_import_helperreturn importlib.import_module('_error')File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_error'
[root@klgdj ~]#
🔰 3.2 使用ssh命令报错
ssh: relocation error: ssh: symbol EVP_KDF_ctrl version OPENSSL_1_1_1b not defined in file libcrypto.so.1.1 with link time reference
。
[root@klgdj ~]# ssh
ssh: relocation error: ssh: symbol EVP_KDF_ctrl version OPENSSL_1_1_1b not defined in file libcrypto.so.1.1 with link time reference
[root@klgdj ~]#
🔰 3.3 问题分析
开源办公套件-----LibreOffice_7.5.0安装失败。
[root@klgdj RPMS]# yum localinstall -y *.rpm
Traceback (most recent call last):File "/usr/lib64/python3.7/site-packages/libdnf/error.py", line 14, in swig_import_helperreturn importlib.import_module(mname)File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 1006, in _gcd_importFile "<frozen importlib._bootstrap>", line 983, in _find_and_loadFile "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 670, in _load_unlockedFile "<frozen importlib._bootstrap>", line 583, in module_from_specFile "<frozen importlib._bootstrap_external>", line 1043, in create_moduleFile "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /usr/lib64/libldap-2.4.so.2: symbol EVP_md2 version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time referenceDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "/usr/bin/yum", line 57, in <module>from dnf.cli import mainFile "/usr/lib/python3.7/site-packages/dnf/__init__.py", line 30, in <module>import dnf.baseFile "/usr/lib/python3.7/site-packages/dnf/base.py", line 29, in <module>import libdnf.transactionFile "/usr/lib64/python3.7/site-packages/libdnf/__init__.py", line 8, in <module>from . import errorFile "/usr/lib64/python3.7/site-packages/libdnf/error.py", line 17, in <module>_error = swig_import_helper()File "/usr/lib64/python3.7/site-packages/libdnf/error.py", line 16, in swig_import_helperreturn importlib.import_module('_error')File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_error'
[root@klgdj RPMS]#
ldd命令介绍:
🍁ldd用来打印或者查看程序运行所需的共享库(访问共享对象依赖关系),常用来解决程序因缺少某个库文件而不能运行的一些问题。
🍁ldd查看libldap-2.4.so.2运行所需的共享库---没有找到EVP_md2有关文件
[root@klgdj RPMS]# ldd /usr/lib64/libldap-2.4.so.2linux-vdso.so.1 (0x00007ffdfa3b2000)liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x00007f04f0e16000)libresolv.so.2 => /usr/lib64/libresolv.so.2 (0x00007f04f0dfd000)libsasl2.so.3 => /usr/lib64/libsasl2.so.3 (0x00007f04f0dde000)libssl.so.1.1 => /opt/software/install/om/script/gspylib/clib/libssl.so.1.1 (0x00007f04f0d4b000)libcrypto.so.1.1 => /opt/software/install/om/script/gspylib/clib/libcrypto.so.1.1 (0x00007f04f0a81000)libc.so.6 => /usr/lib64/libc.so.6 (0x00007f04f08c9000)libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f04f08c2000)libcrypt.so.1 => /usr/lib64/libcrypt.so.1 (0x00007f04f0882000)libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00007f04f082c000)libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00007f04f0746000)libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00007f04f072d000)libcom_err.so.2 => /usr/lib64/libcom_err.so.2 (0x00007f04f0727000)libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f04f0704000)/lib64/ld-linux-x86-64.so.2 (0x00007f04f0e99000)libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00007f04f06f2000)libkeyutils.so.1 => /usr/lib64/libkeyutils.so.1 (0x00007f04f06eb000)libselinux.so.1 => /usr/lib64/libselinux.so.1 (0x00007f04f06bf000)libpcre2-8.so.0 => /usr/lib64/libpcre2-8.so.0 (0x00007f04f062a000)
[root@klgdj RPMS]# [root@klgdj ~]# nm /opt/software/openGauss/script/gspylib/clib/libssl.so.1.1| grep EVP_md2
[root@klgdj ~]#
-------------没有找到EVP_md2库文件
🔰 3.4 问题解决
🔰 3.4.1 解决方案一
操作系统默认会把libssl.so.1.1链接到/lib64目录中,但是安装openGauss数据库后
会把libssl.so.1.1
文件软链接到/opt/software/install/om/script/gspylib/clib/libssl.so.1.1
;
libcrypto.so.1.1
文件软链接到/opt/software/install/om/script/gspylib/clib/libcrypto.so.1.1
。
libssl.so.1.1 => /opt/software/install/om/script/gspylib/clib/libssl.so.1.1 (0x00007f04f0d4b000)
libcrypto.so.1.1 => /opt/software/install/om/script/gspylib/clib/libcrypto.so.1.1 (0x00007f04f0a81000)
解决:
先创建dbgrp组和omm用户,预安装openGauss时就不会再创建omm,安装后,yum、ssh命令可以正常使用。
🔰 3.4.2 解决方案二
解决:
🍁 1、vim /etc/profile
🍁2、注释其中openGauss安装自动写入的环境变量
🍁3、source /etc/profile 还会报错,需要重启系统
#export LD_LIBRARY_PATH=$GPHOME/script/gspylib/clib:$LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=$GPHOME/lib:$LD_LIBRARY_PATH
结果:
[root@klgdj ~]# ssh -V
OpenSSH_8.2p1, OpenSSL 1.1.1k FIPS 25 Mar 2021
[root@klgdj ~]#
🔰 3.4.3 方案三不能解决,看前两个即可–安装完,检查还是无EVP_md2
重新编译安装openssl
官网下载–>openssl
🍁
1、上传解压
[root@klgdj ~]# tar -zxvf openssl-3.1.1.tar.gz
🍁2、编译
[root@klgdj ~]# cd openssl-3.1.1/
[root@klgdj openssl-3.1.1]# ./config shared enable-ssl3 enable-ssl3-method
🍁3、安装--时间有点长
[root@klgdj openssl-3.1.1]# make & make install
[root@klgdj openssl-3.1.1]# find / -name libssl.so.3
find: ‘/run/user/994/gvfs’: 权限不够
/root/openssl-3.1.1/libssl.so.3
/usr/local/lib64/libssl.so.3
[root@klgdj openssl-3.1.1]#
🍁4、检查新编译的文件是否包含EVP_md2文件
nm /usr/local/lib64/libssl.so.3 | grep EVP_md2
🍁5、编译完成后有EVP_md2,编译好的库拷贝替换原来的libssl.so.1.1
[root@klgdj openssl-3.1.1]# cp /usr/local/lib64/libssl.so.3 /opt/software/openGauss/script/gspylib/clib/libssl.so.1.1
cp:是否覆盖’/opt/software/openGauss/script/gspylib/clib/libssl.so.1.1’? y
[root@klgdj openssl-3.1.1]#
🍁6、再次检查和测试------未解决
🔻 四、总结—温故知新
❓ 该章详细介绍了openGauss数据库安装过程自动创建初始用户---omm和dbgrp用户组(使用这种方式---导致openGauss安装后yum、ssh命令无法使用的解决方案)。
❓ 方式三未能解决,看方式一、二即可😂😂😂😂😂😂。
👈【上一篇】 | 💖The End💖 点点关注,收藏不迷路💖 | 【下一篇】👉 |