how to compile mongodb with ssl, got " Couldn't find OpenSSL ssl.h header and library " error?

1,134 views
Skip to first unread message

甘锣

unread,
Feb 12, 2017, 5:38:06 AM2/12/17
to mongodb-user
OS : OS X

I already install openssl on /usr/local/openssl/1.0.2j/, and I try to compile mongodb use  scons all --prefix=/usr/local/mongodb/3.4.2/ -j 8 --ssl=/usr/local/openssl/1.0.2j/, but got error Couldn't find OpenSSL ssl.h header and library.  how did I solve this?

Andrew Morrow

unread,
Feb 13, 2017, 12:07:18 PM2/13/17
to mongod...@googlegroups.com

Hi -

The --ssl flag doesn't work that way, unfortunately - it doesn't take any arguments. What you need to do instead is set the header and library search paths for the build to include the paths into your SSL build. In your case, this should look like:

scons all --prefix=/usr/local/mongodb/3.4.2 -j 8 --ssl CPPPATH=/usr/local/openssl/1.0.2j/include LIBPATH=/usr/local/openssl/1.0.2j/lib

Thanks,
Andrew


On Sat, Feb 11, 2017 at 8:56 AM, 甘锣 <ganluo...@gmail.com> wrote:
OS : OS X

I already install openssl on /usr/local/openssl/1.0.2j/, and I try to compile mongodb use  scons all --prefix=/usr/local/mongodb/3.4.2/ -j 8 --ssl=/usr/local/openssl/1.0.2j/, but got error Couldn't find OpenSSL ssl.h header and library.  how did I solve this?

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/21a4c66a-1dbb-4cff-b9d2-2368d91f662c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages