/opt/mongodb/mongodb-linux-x86_64-rhel70-4.2.7/bin/mongo: error while loading shared libraries: libcrypto.so.10: cannot open shared object file: No such file or directory
时间: 2023-08-21 10:06:27 浏览: 253
这个错误是因为缺少 libcrypto.so.10 这个共享库文件,您可以通过以下步骤解决该问题:
1. 确认 libcrypto.so.10 是否已经安装在系统中,可以使用以下命令进行检查:
```
find / -name libcrypto.so.10 -print 2>/dev/null
```
2. 如果没有安装,则需要安装 OpenSSL 库,例如:
```
sudo yum install openssl
```
3. 如果已经安装了 OpenSSL 库,但是依然找不到 libcrypto.so.10 文件,则需要创建一个软链接:
```
sudo ln -s /usr/lib64/libcrypto.so.1.0.2k libcrypto.so.10
```
4. 最后,再次运行您的程序,应该就可以找到 libcrypto.so.10 文件了。
希望能帮到您!
相关问题
为什么会这样[user_mongo@nosql01 replicaset]$ cd /opt [user_mongo@nosql01 opt]$ ll total 0 drwxr-xr-x. 3 root root 25 Mar 16 17:08 servers drwxr-xr-x. 2 root root 51 Mar 16 17:10 software [user_mongo@nosql01 opt]$ tar -zxvf /opt/software/mongodb-linux-x86_64-rhel70-4.4.12.tgz -C /opt/servers/mongodb_demo/replicaset/ mongodb-linux-x86_64-rhel70-4.4.12/LICENSE-Community.txt tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/LICENSE-Community.txt: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/MPL-2 tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/MPL-2: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/README tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/README: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/THIRD-PARTY-NOTICES tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/THIRD-PARTY-NOTICES: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/install_compass tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/install_compass: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongo tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongo: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongod tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongod: Cannot open: No such file or directory mongodb-linux-x86_64-rhel70-4.4.12/bin/mongos tar: mongodb-linux-x86_64-rhel70-4.4.12: Cannot mkdir: Permission denied tar: mongodb-linux-x86_64-rhel70-4.4.12/bin/mongos: Cannot open: No such file or directory tar: Exiting with failure status due to previous errors [user_mongo@nosql01 opt]$ tar -zcvf /opt/software/mongodb-linux-x86_64-rhel70-4.4.12.tgz -C /opt/servers/mongodb_demo/replicaset/ tar: Cowardly refusing to create an empty archive Try `tar --help' or `tar --usage' for more information.
根据你提供的信息,出现这种情况可能是因为你没有足够的权限在目标文件夹中创建文件。可以尝试以下解决方法:
1.使用sudo命令运行tar命令,以管理员权限运行。例如:sudo tar -zxvf /opt/software/mongodb-linux-x86_64-rhel70-4.4.12.tgz -C /opt/servers/mongodb_demo/replicaset/
2.检查目标文件夹/opt/servers/mongodb_demo/replicaset/的权限是否正确,可以使用ls -l命令查看。如果权限不足,可以使用chmod命令更改目标文件夹的权限。例如:sudo chmod 755 /opt/servers/mongodb_demo/replicaset/
希望以上解决方法能够帮助到你。
阅读全文
相关推荐
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![tgz](https://img-home.csdnimg.cn/images/20250102104920.png)
![tgz](https://img-home.csdnimg.cn/images/20250102104920.png)
![tgz](https://img-home.csdnimg.cn/images/20250102104920.png)
![tgz](https://img-home.csdnimg.cn/images/20250102104920.png)
![tgz](https://img-home.csdnimg.cn/images/20250102104920.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![7z](https://img-home.csdnimg.cn/images/20241231044736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![xz](https://img-home.csdnimg.cn/images/20250102104920.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![tar](https://img-home.csdnimg.cn/images/20250102104920.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)