MongoDB報錯mongorestore: error while loading shared libraries: libsasl2.so.2
MongoDB使用命令報錯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:
缺失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
來源:
問題背景:
在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:
缺失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
來源:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29734436/viewspace-2151547/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL 啟動報錯 error while loading shared librariesMySqlErrorWhile
- error while loading shared libraries: libclntsh.so.10.1ErrorWhile
- ggsci: error while loading shared libraries: libnnz11.soErrorWhile
- error while loading shared libraries: libgconf-2.so.4:ErrorWhileGC
- mongod: error while loading shared libraries: libstdc++.so.6GoErrorWhileC++
- MySQL 5.7初始化報錯error while loading shared libraries: libnuma.so.1MySqlErrorWhile
- error while loading shared libraries: libgsl.so.27: cannot open shared objectErrorWhileObject
- Error while loading shared libraries: libreadline.so.7: cannot open shared objecErrorWhileOBJ
- 故障解決:error while loading shared libraries: libncurses.so.5ErrorWhile
- ./XXX.XX: error while loading shared libraries: libGLEW.so.2.1: cannot open shared object file: NoErrorWhileObject
- rpm: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such fi...ErrorWhileGCObject
- error while loading shared libraries: libpython3.7m(2.7).so.1.0: cannot open shared object file: NErrorWhilePythonObject
- linux編譯Android原始碼的時候出錯:error while loading shared libraries: libstdc++.so.6Linux編譯Android原始碼ErrorWhileC++
- linux puppeteer 截圖提示缺少chrome-linux/chrome error while loading shared libraries: libXdamage.so.1LinuxChromeErrorWhile
- Qt開發,報錯:Error while building/deploying project untitled (kit: ....)QTErrorWhileUIProject
- MongoDB 邏輯還原工具mongorestoreMongoDBREST
- 在 fish 終端下報錯 source: Error while reading file “xxx” 等問題ErrorWhile
- cassandra啟動報錯:Exiting due to error while processing commit log during initialization.ErrorWhileMIT
- CentOS7提示 libsasl2.so.2: cannot open shared object fileCentOSObject
- ERROR 1045 (28000): ProxySQL Error: 報錯ErrorSQL
- mongodb 報錯記錄MongoDB
- 排錯./configure: error: the HTTP XSLT module requires the libxml2/libxslt libraries. You can either doErrorHTTPUIXML
- 【Redis】slaveof 報錯 Background transfer errorRedisError
- 網站報錯:“Database Server Error”網站DatabaseServerError
- pip install scrapy報錯:error: UnableError
- MongoDB 備份恢復啟動後執行操作報錯:Error:couldn't add user:not masterMongoDBErrorAST
- PVE安裝Windows 95報錯 while initializing device IOSWindowsWhiledeviOS
- Ubuntu 系統 apt 報錯:relocation errorUbuntuAPTError
- weblogic報錯: OPatch failed with error code 73WebAIError
- ogg報錯error 11, Resource temporarily unavailableErrorAI
- 反序列 unserialize(): Error 報錯問題Error
- mongodb啟動報錯怎麼辦MongoDB
- mongodb find報錯怎麼解決MongoDB
- 關於Nginx mmap(MAP_ANON|MAP_SHARED, 314572800)報錯Nginx
- Oracle dataguard報錯:Error 1017 received logging on to the standbyOracleError
- linux系統報錯AER PCIe Bus ErrorLinuxError
- Dynamics CRM CRM Reporting Error: Error occurred while fetching the data extension的解決方法ErrorWhile
- 執行flutter run命令報錯::ERROR: Could not connect to lockdownd, error code -17FlutterError