记录 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.

目录
相关文章
|
2月前
|
关系型数据库 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
84 0
|
13天前
|
关系型数据库 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
20 2
|
2月前
|
缓存 Ubuntu Linux
error while loading shared libraries: libxcb-icccm.so.4: cannot open shared object file: No such file or directory 问题如何处理
【5月更文挑战第16天】error while loading shared libraries: libxcb-icccm.so.4: cannot open shared object file: No such file or directory 问题如何处理
234 0
|
2月前
|
Java
Java Object 类
5月更文挑战第16天
|
26天前
|
Java
Java中的Object类 ( 详解toString方法 | equals方法 )
Java中的Object类 ( 详解toString方法 | equals方法 )
|
2月前
|
存储 算法 Java
滚雪球学Java(42):探索对象的奥秘:解析Java中的Object类
【5月更文挑战第17天】🏆本文收录于「滚雪球学Java」专栏,专业攻坚指数级提升,希望能够助你一臂之力,帮你早日登顶实现财富自由🚀;同时,欢迎大家关注&&收藏&&订阅!持续更新中,up!up!up!!
32 2
滚雪球学Java(42):探索对象的奥秘:解析Java中的Object类
|
1月前
|
Java
【Java】Object类简单解析
【Java】Object类简单解析
16 1
|
1月前
|
前端开发 JavaScript Java
Java基础10-深入理解Class类和Object类(二)
Java基础10-深入理解Class类和Object类(二)
27 5
|
1月前
|
Java C++
Java基础10-深入理解Class类和Object类(一)
Java基础10-深入理解Class类和Object类(一)
26 4
|
2月前
|
Java
【JAVA学习之路 | 基础篇】Object类及重写的equals()与toString()
【JAVA学习之路 | 基础篇】Object类及重写的equals()与toString()