mongod:加载共享库时出错:libssl.so.10 libcrypto.so.10 [英] mongod: error while loading shared libraries: libssl.so.10 libcrypto.so.10

查看:6008
本文介绍了mongod:加载共享库时出错:libssl.so.10 libcrypto.so.10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

我下载了mongodb 3.0.7 tar文件.然后,将bin目录添加到我的路径中:

I downloaded the mongodb 3.0.7 tar files. Then I added the bin directory to my path:

export PATH=<mongodb-install-directory>/bin:$PATH

然后,当我运行mongodb服务器时:

Then when I run the mongodb server:

mongod --fork --logpath "/home/me/mongolog" --dbpath "/home/me/data"

我收到此错误:

mongod: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory

我做什么

我尝试了这解决方案.简而言之,我更新了自己的openssl:

I tried this solution. In brief I updated my openssl:

sudo apt-get update
sudo apt-get install libssl1.0.0 libssl-dev

然后:

cd /lib/x86_64-linux-gnu
sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10

,但表示找不到libssl.so.10libcrypto.so.10.我不知道该怎么办!

but it says that it cannot find libssl.so.10 and libcrypto.so.10. I don't know what to do!

推荐答案

sudo apt-get purge mongodb-org*

只需从此处重新开始.

如果您不想要3.2,请不要

If you don't want 3.2, do not

sudo apt-get install -y mongodb-org

在下一步中指定所有单个组件的版本.

Specify the version for all the individual components in the next step.

或者您可以从 mongodb 复制正确的版本链接.

OR you can copy the correct version link from mongodb.

您将需要

cd /Downloads 
wget wget https://fastdl.mongodb.org/linux/mongodb-correct-version.tgz
tar -zxvf mongodb-correct-version.tgz 

您应该看到所有可执行文件. 确保/usr/local/bin在您的PATH中

You should see all the executables. Make sure /usr/local/bin is in your PATH

echo $PATH

为mongod服务器创建符号链接并检查版本.

Create a symbolic link for the mongod server and check the version.

sudo ln -s ~/Downloads/mongodb-correct-version/bin/mongod /usr/local/sbin/bin/mongod
mongod --version

现在为外壳创建一个符号链接并检查版本.

Now create a symbolic link for the shell and check the version.

sudo ln -s ~/Downloads/mongodb-correct-version/bin/mongo /usr/local/bin/mongo
mongo --version

为服务器创建目录路径.

Create a directory path for the server.

mkdir ~/data
mkdir ~/data/db 

启动服务器,并使其从不同于Shell的单独终端运行.

Start the server and let it run from a separate terminal than the shell.

mongod --dbpath ~/data/db/

它应该在端口27017上侦听. 在新的终端中,启动mongo.

It should be listening on port 27017. In a new terminal, start mongo.

mongo

这篇关于mongod:加载共享库时出错:libssl.so.10 libcrypto.so.10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆