MongoDB报错mongorestore: error while loading shared libraries: libsasl2.so.2
发表于:2024-11-23 作者:千家信息网编辑
千家信息网最后更新 2024年11月23日,MongoDB使用命令报错mongorestore: error while loading shared libraries: libsasl2.so.2: cannot open shared o
千家信息网最后更新 2024年11月23日MongoDB报错mongorestore: error while loading shared libraries: libsasl2.so.2MongoDB使用命令报错mongorestore: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
问题背景:
在CentOS7.4上部署MongoDB3.20,使用mongorestore恢复数据时报错
[root@server6 dump]# mongorestore
mongorestore: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
[root@server6 dump]# find / -name mongorestore
^C
[root@server6 dump]#
[root@server6 dump]#
[root@server6 dump]# vi /etc/profile
[root@server6 dump]# ls /data/mongodb/bin
bsondump mongo mongod mongodump mongoexport mongofiles mongoimport mongooplog mongoperf mongorestore mongos mongostat mongotop
[root@server6 dump]# mongorestore
mongorestore: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
[root@server6 dump]# /data/mongodb/bin/mongorestore
/data/mongodb/bin/mongorestore: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
[root@server6 dump]#
经核查,系统中确实没有该库文件。
从CentOS6.8系统上下载libsasl2.so.2库文件,传到CentOS7上对应路径
CentOS6.8上:
[root@test02 ~]# find / -name libsasl*
/usr/lib64/libsasl2.so.2
/usr/lib64/libsasl2.so.2.0.23
/usr/lib64/sasl2/libsasldb.so.2.0.23
/usr/lib64/sasl2/libsasldb.so.2
/usr/lib64/sasl2/libsasldb.so
[root@test02 ~]# ll /usr/lib64/libsasl2.so.2
lrwxrwxrwx. 1 root root 18 Feb 23 2017 /usr/lib64/libsasl2.so.2 -> libsasl2.so.2.0.23
[root@test02 ~]# ll /usr/lib64/libsasl2.so.2.0.23
-rwxr-xr-x. 1 root root 106160 Mar 25 2015 /usr/lib64/libsasl2.so.2.0.23
[root@test02 ~]# ll /usr/lib64/sasl2/libsasldb.so
lrwxrwxrwx. 1 root root 19 Feb 23 2017 /usr/lib64/sasl2/libsasldb.so -> libsasldb.so.2.0.23
[root@test02 ~]# ll /usr/lib64/sasl2/libsasldb.so.2
lrwxrwxrwx. 1 root root 19 Feb 23 2017 /usr/lib64/sasl2/libsasldb.so.2 -> libsasldb.so.2.0.23
[root@test02 ~]# ll /usr/lib64/sasl2/libsasldb.so.2.0.23
-rwxr-xr-x. 1 root root 22784 Mar 25 2015 /usr/lib64/sasl2/libsasldb.so.2.0.23
[root@test02 ~]# sz /usr/lib64/libsasl2.so.2
[root@test02 ~]# 0
[root@test02 ~]#
[root@test02 ~]# sz /usr/lib64/libsasl2.so.2.0.23
[root@test02 ~]# 0
[root@test02 ~]# ll -h /usr/lib64/libsasl2.so.2.0.23
-rwxr-xr-x. 1 root root 104K Mar 25 2015 /usr/lib64/libsasl2.so.2.0.23
[root@test02 ~]# ll -h /usr/lib64/sasl2/libsasldb.so.2.0.23
-rwxr-xr-x. 1 root root 23K Mar 25 2015 /usr/lib64/sasl2/libsasldb.so.2.0.23
[root@test02 ~]# sz /usr/lib64/sasl2/libsasldb.so.2.0.23
[root@test02 ~]# 0
[root@test02 ~]#
CentOS7上:
[root@server6 dump]# find / -name libsasl*
……
/usr/lib64/libsasl2.so.3.0.0
/usr/lib64/libsasl2.so.3
/usr/lib64/sasl2/libsasldb.so
/usr/lib64/sasl2/libsasldb.so.3
/usr/lib64/sasl2/libsasldb.so.3.0.0
/usr/lib64/libsaslwrapper.so.1
/usr/lib64/libsaslwrapper.so.1.0.0
[root@server6 dump]# cd /usr/lib64/
[root@server6 lib64]# ll libsasl2.so*
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# rz
z waiting to receive.**B0100000023be50
[root@server6 lib64]# ll libsasl2.so*
-rw-r--r-- 1 root root 106160 3月 25 2015 libsasl2.so.2.0.23
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# ln -s libsasl2.so.2 libsasl2.so.2.0.23
ln: 无法创建符号链接"libsasl2.so.2.0.23": 文件已存在
[root@server6 lib64]# ll libsasl2.so*
-rw-r--r-- 1 root root 106160 3月 25 2015 libsasl2.so.2.0.23
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# ln -s libsasl2.so.2.0.23 libsasl2.so.2
[root@server6 lib64]# ll libsasl2.so*
lrwxrwxrwx 1 root root 18 3月 5 17:17 libsasl2.so.2 -> libsasl2.so.2.0.23
-rw-r--r-- 1 root root 106160 3月 25 2015 libsasl2.so.2.0.23
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# chmod a+x libsasl2.so.2.0.23
[root@server6 lib64]# ll libsasl2.so*
lrwxrwxrwx 1 root root 18 3月 5 17:17 libsasl2.so.2 -> libsasl2.so.2.0.23
-rwxr-xr-x 1 root root 106160 3月 25 2015 libsasl2.so.2.0.23
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# mongorestore
2018-03-05T17:18:19.311+0800 using default 'dump' directory
2018-03-05T17:18:19.312+0800 Failed: can't create ActualPath object from path dump: stat dump: no such file or directory
[root@server6 lib64]#
参考:运行yum时出现错误,缺失libsasl2.so.2文件
2014-12-24
运行yum时出现错误,缺失libsasl2.so.2文件
[root@localhost /]# yum repolist
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libsasl2.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, Oct 12 2012, 14:23:48)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
缺失libsasl2.so.2文件,重新安装或者找一个电脑有此文件的直接复制过去即可。
我的解决方法:
[root@localhost ~]# scp /usr/lib64/libsasl2.so.2 root@192.168.1.253:/usr/lib64/
[root@localhost ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
local balack 3,648
repolist: 3,648
[root@localhost ~]#
运行yum时出现错误,缺失libsasl2.so.2文件
原文地址:http://www.cnblogs.com/xfan1982/p/4182039.html
来源:http://www.mamicode.com/info-detail-386519.html
问题背景:
在CentOS7.4上部署MongoDB3.20,使用mongorestore恢复数据时报错
[root@server6 dump]# mongorestore
mongorestore: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
[root@server6 dump]# find / -name mongorestore
^C
[root@server6 dump]#
[root@server6 dump]#
[root@server6 dump]# vi /etc/profile
[root@server6 dump]# ls /data/mongodb/bin
bsondump mongo mongod mongodump mongoexport mongofiles mongoimport mongooplog mongoperf mongorestore mongos mongostat mongotop
[root@server6 dump]# mongorestore
mongorestore: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
[root@server6 dump]# /data/mongodb/bin/mongorestore
/data/mongodb/bin/mongorestore: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
[root@server6 dump]#
经核查,系统中确实没有该库文件。
从CentOS6.8系统上下载libsasl2.so.2库文件,传到CentOS7上对应路径
CentOS6.8上:
[root@test02 ~]# find / -name libsasl*
/usr/lib64/libsasl2.so.2
/usr/lib64/libsasl2.so.2.0.23
/usr/lib64/sasl2/libsasldb.so.2.0.23
/usr/lib64/sasl2/libsasldb.so.2
/usr/lib64/sasl2/libsasldb.so
[root@test02 ~]# ll /usr/lib64/libsasl2.so.2
lrwxrwxrwx. 1 root root 18 Feb 23 2017 /usr/lib64/libsasl2.so.2 -> libsasl2.so.2.0.23
[root@test02 ~]# ll /usr/lib64/libsasl2.so.2.0.23
-rwxr-xr-x. 1 root root 106160 Mar 25 2015 /usr/lib64/libsasl2.so.2.0.23
[root@test02 ~]# ll /usr/lib64/sasl2/libsasldb.so
lrwxrwxrwx. 1 root root 19 Feb 23 2017 /usr/lib64/sasl2/libsasldb.so -> libsasldb.so.2.0.23
[root@test02 ~]# ll /usr/lib64/sasl2/libsasldb.so.2
lrwxrwxrwx. 1 root root 19 Feb 23 2017 /usr/lib64/sasl2/libsasldb.so.2 -> libsasldb.so.2.0.23
[root@test02 ~]# ll /usr/lib64/sasl2/libsasldb.so.2.0.23
-rwxr-xr-x. 1 root root 22784 Mar 25 2015 /usr/lib64/sasl2/libsasldb.so.2.0.23
[root@test02 ~]# sz /usr/lib64/libsasl2.so.2
[root@test02 ~]# 0
[root@test02 ~]#
[root@test02 ~]# sz /usr/lib64/libsasl2.so.2.0.23
[root@test02 ~]# 0
[root@test02 ~]# ll -h /usr/lib64/libsasl2.so.2.0.23
-rwxr-xr-x. 1 root root 104K Mar 25 2015 /usr/lib64/libsasl2.so.2.0.23
[root@test02 ~]# ll -h /usr/lib64/sasl2/libsasldb.so.2.0.23
-rwxr-xr-x. 1 root root 23K Mar 25 2015 /usr/lib64/sasl2/libsasldb.so.2.0.23
[root@test02 ~]# sz /usr/lib64/sasl2/libsasldb.so.2.0.23
[root@test02 ~]# 0
[root@test02 ~]#
CentOS7上:
[root@server6 dump]# find / -name libsasl*
……
/usr/lib64/libsasl2.so.3.0.0
/usr/lib64/libsasl2.so.3
/usr/lib64/sasl2/libsasldb.so
/usr/lib64/sasl2/libsasldb.so.3
/usr/lib64/sasl2/libsasldb.so.3.0.0
/usr/lib64/libsaslwrapper.so.1
/usr/lib64/libsaslwrapper.so.1.0.0
[root@server6 dump]# cd /usr/lib64/
[root@server6 lib64]# ll libsasl2.so*
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# rz
z waiting to receive.**B0100000023be50
[root@server6 lib64]# ll libsasl2.so*
-rw-r--r-- 1 root root 106160 3月 25 2015 libsasl2.so.2.0.23
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# ln -s libsasl2.so.2 libsasl2.so.2.0.23
ln: 无法创建符号链接"libsasl2.so.2.0.23": 文件已存在
[root@server6 lib64]# ll libsasl2.so*
-rw-r--r-- 1 root root 106160 3月 25 2015 libsasl2.so.2.0.23
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# ln -s libsasl2.so.2.0.23 libsasl2.so.2
[root@server6 lib64]# ll libsasl2.so*
lrwxrwxrwx 1 root root 18 3月 5 17:17 libsasl2.so.2 -> libsasl2.so.2.0.23
-rw-r--r-- 1 root root 106160 3月 25 2015 libsasl2.so.2.0.23
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# chmod a+x libsasl2.so.2.0.23
[root@server6 lib64]# ll libsasl2.so*
lrwxrwxrwx 1 root root 18 3月 5 17:17 libsasl2.so.2 -> libsasl2.so.2.0.23
-rwxr-xr-x 1 root root 106160 3月 25 2015 libsasl2.so.2.0.23
lrwxrwxrwx 1 root root 17 1月 9 17:47 libsasl2.so.3 -> libsasl2.so.3.0.0
-rwxr-xr-x 1 root root 121328 8月 3 2017 libsasl2.so.3.0.0
[root@server6 lib64]# mongorestore
2018-03-05T17:18:19.311+0800 using default 'dump' directory
2018-03-05T17:18:19.312+0800 Failed: can't create ActualPath object from path dump: stat dump: no such file or directory
[root@server6 lib64]#
参考:运行yum时出现错误,缺失libsasl2.so.2文件
2014-12-24
运行yum时出现错误,缺失libsasl2.so.2文件
[root@localhost /]# yum repolist
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libsasl2.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, Oct 12 2012, 14:23:48)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
缺失libsasl2.so.2文件,重新安装或者找一个电脑有此文件的直接复制过去即可。
我的解决方法:
[root@localhost ~]# scp /usr/lib64/libsasl2.so.2 root@192.168.1.253:/usr/lib64/
[root@localhost ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
local balack 3,648
repolist: 3,648
[root@localhost ~]#
运行yum时出现错误,缺失libsasl2.so.2文件
原文地址:http://www.cnblogs.com/xfan1982/p/4182039.html
来源:http://www.mamicode.com/info-detail-386519.html
文件
缺失
错误
时出
运行
库文件
系统
上下
原文
命令
地址
数据
方法
时报
来源
电脑
符号
背景
路径
链接
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
元元网络技术有限公司
阿布夏在哪个服务器
2016年服务器idc
工作站软件开发
速商网络安全插画
网络安全与健康生活
数据库应用技术在线作业
网络安全易画手抄报
帆软两个数据库对比
华夏恒生互联网科技基金链接
电信网络安全案例
数据库技术图
上海朱璐网络安全员
投资域名需要绑定服务器吗
什么叫网络安全体系响应
电脑软件开发实战
如何实施网络安全法律法规
湖北联想服务器虚拟化费用
腾讯数据库聊天记录怎么查
网络安全法的规定谁负责
我的世界15人服务器多少钱
舟山企业软件开发流程八个步骤
什么是网络安全趋势
中职 网络安全技能大赛
企业注册数据库
个人虚拟存储服务器
了解思科网络技术
大学生软件开发策划书
北京飞龙互联网科技有限公司
优势的软件开发外包