记录 libldap-2.4.so.2: cannot open shared object file: No such file or directory

简介: 1.背景: 卸载openldap相关的所有rpm包后,出现libldap-2.4.so.2: cannot open shared object file: No such file or directory [root@sht-sgmhadoopcm-01 ~]# rpm -qa|grep openldap openldap-2.
1.背景: 卸载openldap相关的所有rpm包后,出现libldap-2.4.so.2: cannot open shared object file: No such file or directory
 [root@sht-sgmhadoopcm-01 ~]# rpm -qa|grep openldap
openldap-2.4.23-32.el6_4.1.x86_64
openldap-devel-2.4.23-32.el6_4.1.x86_64
openldap-clients-2.4.23-32.el6_4.1.x86_64
openldap-servers-2.4.23-32.el6_4.1.x86_64
openldap-servers-sql-2.4.23-32.el6_4.1.x86_64

[root@sht-sgmhadoopcm-01 ~]# rpm -e openldap-* --nodeps
warning: /etc/openldap/ldap.conf saved as /etc/openldap/ldap.conf.rpmsave
[root@sht-sgmhadoopcm-01 ~]# rpm -qa|grep openldap
openldap-devel-2.4.23-32.el6_4.1.x86_64
openldap-clients-2.4.23-32.el6_4.1.x86_64
openldap-servers-2.4.23-32.el6_4.1.x86_64
openldap-servers-sql-2.4.23-32.el6_4.1.x86_64
[root@sht-sgmhadoopcm-01 ~]# rpm -e openldap-servers-sql-2.4.23-32.el6_4.1.x86_64
[root@sht-sgmhadoopcm-01 ~]# rpm -e openldap-servers-2.4.23-32.el6_4.1.x86_64
warning: /etc/sysconfig/ldap saved as /etc/sysconfig/ldap.rpmsave
[root@sht-sgmhadoopcm-01 ~]# rpm -e openldap-clients-2.4.23-32.el6_4.1.x86_64
[root@sht-sgmhadoopcm-01 ~]# rpm -e openldap-devel-2.4.23-32.el6_4.1.x86_64
[root@sht-sgmhadoopcm-01 ~]#
[root@sht-sgmhadoopcm-01 ~]# rpm -qa|grep openldap
[root@sht-sgmhadoopcm-01 ~]# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   libldap-2.4.so.2: cannot open shared object file: No such file or directory

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Nov 22 2013, 12:16:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq
 

[root@sht-sgmhadoopcm-01 ~]#

2.解决办法:下载openldap-2.4.23-32.el6_4.1.x86_64.rpm,校验MD5,再强制安装

[root@sht-sgmhadoopcm-01 ~]# wget http://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/6.4/x86_64/updates/fastbugs/openldap-2.4.23-32.el6_4.1.x86_64.rpm
[root@sht-sgmhadoopcm-01 ~]#  rpm -v --checksig ./openldap-2.4.23-32.el6_4.1.x86_64.rpm
./openldap-2.4.23-32.el6_4.1.x86_64.rpm:
    Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
    Header SHA1 digest: OK (2c80a5928199d9ac370b1def5d131ccdf18db585)
    MD5 digest: OK (a81248ad1f3e81b043a360b2d93ef404)
    V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
[root@sht-sgmhadoopcm-01 ~]# rpm -ivh --force --nodeps openldap-2.4.23-32.el6_4.1.x86_64.rpm
warning: openldap-2.4.23-32.el6_4.1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
Preparing...                ########################################### [100%]
   1:openldap               ########################################### [100%]
[root@sht-sgmhadoopcm-01 ~]# yum

Loaded plugins: fastestmirror, security
You need to give some command
Usage: yum [options] COMMAND

List of Commands:

check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system
groupinfo      Display details about a package group
groupinstall   Install the packages in a group on your system
grouplist      List available package groups
groupremove    Remove the packages in a group from your system
help           Display a helpful usage message
history        Display, or use, the transaction history
info           Display details about a package or group of packages
install        Install a package or packages on your system
list           List a package or groups of packages
load-transaction load a saved transaction from filename
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repolist       Display the configured software repositories
resolvedep     Determine which package provides the given dependency
search         Search package details for the given string
shell          Run an interactive yum shell
update         Update a package or packages on your system
update-minimal Works like update, but goes to the 'newest' package match which fixes a problem that affects your system
updateinfo     Acts on repository update information
upgrade        Update packages taking obsoletes into account
version        Display a version for the machine and/or available repos.

目录
相关文章
|
3月前
|
应用服务中间件 Shell 网络安全
nginx安装提示 libssl.so.3: cannot open shared object file: No
【8月更文挑战第1天】### 原因 未将安装的ssl中的`libssl.so.3`链接到`/usr/lib`导致缺失。 ### 解决方案 1. 检查openssl是否已安装,若为低版本则需重装。 ```sh whereis openssl
1829 6
|
3月前
|
Ubuntu
Ubuntu22.04,AOSP编译报错: libncurses.so.5: cannot open shared object file: No such file
本文描述了在Ubuntu 22.04系统上编译AOSP时遇到的`libncurses.so.5`缺失错误,并提供了通过安装相应库解决该问题的步骤。
417 0
|
4月前
|
关系型数据库 MySQL
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file
338 2
|
18天前
|
存储 Java 程序员
Java基础的灵魂——Object类方法详解(社招面试不踩坑)
本文介绍了Java中`Object`类的几个重要方法,包括`toString`、`equals`、`hashCode`、`finalize`、`clone`、`getClass`、`notify`和`wait`。这些方法是面试中的常考点,掌握它们有助于理解Java对象的行为和实现多线程编程。作者通过具体示例和应用场景,详细解析了每个方法的作用和重写技巧,帮助读者更好地应对面试和技术开发。
66 4
|
1月前
|
Java
Java Object 类详解
在 Java 中,`Object` 类是所有类的根类,每个 Java 类都直接或间接继承自 `Object`。作为所有类的超类,`Object` 定义了若干基本方法,如 `equals`、`hashCode`、`toString` 等,这些方法在所有对象中均可使用。通过重写这些方法,可以实现基于内容的比较、生成有意义的字符串表示以及确保哈希码的一致性。此外,`Object` 还提供了 `clone`、`getClass`、`notify`、`notifyAll` 和 `wait` 等方法,支持对象克隆、反射机制及线程同步。理解和重写这些方法有助于提升 Java 代码的可读性和可维护性。
|
6月前
|
Java
Java Object 类
5月更文挑战第16天
|
3月前
|
Java
【Java基础面试二十】、介绍一下Object类中的方法
这篇文章介绍了Java中Object类的常用方法,包括`getClass()`、`equals()`、`hashCode()`、`toString()`、`wait()`、`notify()`、`notifyAll()`和`clone()`,并提到了不推荐使用的`finalize()`方法。
【Java基础面试二十】、介绍一下Object类中的方法
|
2月前
|
Python
类与面向对象编程(Object-Oriented Programming, OOP)
类与面向对象编程(Object-Oriented Programming, OOP)
|
3月前
|
前端开发 Java 编译器
【前端学java】java中的Object类和前端中的Object有什么区别(9)
【8月更文挑战第10天】java中的Object类和前端中的Object有什么区别
44 0
【前端学java】java中的Object类和前端中的Object有什么区别(9)
|
3月前
|
算法 Java
12 Java常用类(一)(内部类+object类+包装类)
12 Java常用类(一)(内部类+object类+包装类)
37 5
下一篇
无影云桌面