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

目录
相关文章
|
1月前
|
Java 测试技术 数据库
hql投影查询之—— [Ljava.lang.Object; cannot be cast to cn.bdqn.guanMingSys.entity.Notice
hql投影查询之—— [Ljava.lang.Object; cannot be cast to cn.bdqn.guanMingSys.entity.Notice
13 0
|
1月前
|
关系型数据库 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
44 0
|
29天前
|
缓存 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 问题如何处理
96 0
|
8月前
|
Java
【面试题精讲】Object类的常见方法有哪些?
【面试题精讲】Object类的常见方法有哪些?
|
26天前
|
Java
Java Object 类
5月更文挑战第16天
|
4天前
|
前端开发 JavaScript Java
Java基础10-深入理解Class类和Object类(二)
Java基础10-深入理解Class类和Object类(二)
15 5
|
4天前
|
Java C++
Java基础10-深入理解Class类和Object类(一)
Java基础10-深入理解Class类和Object类(一)
13 4
|
10天前
|
Java API
JavaSE——常用API进阶一(1/3)-Object类(Object类的作用、Object类的常见方法-toString方法、equal方法、clone方法)
JavaSE——常用API进阶一(1/3)-Object类(Object类的作用、Object类的常见方法-toString方法、equal方法、clone方法)
9 0
|
10天前
|
Java 编译器 数据处理
JavaSE——面相对象高级一(4/4)-继承相关的注意事项:权限修饰符、单继承、Object类、方法重写、子类访问成员的特点......
JavaSE——面相对象高级一(4/4)-继承相关的注意事项:权限修饰符、单继承、Object类、方法重写、子类访问成员的特点......
7 0
|
20天前
|
算法 Java 测试技术
简介Object类+接口实例(深浅拷贝、对象数组排序)
简介Object类+接口实例(深浅拷贝、对象数组排序)