Using Amazon Linux AMI 2013.09.2 - ami-bba18dd2 (64-bit)
I want to use the mongodb provided by EPEL because it is compiled with SSL support.
[root@domU-12-31-39-02-19-B8 ec2-user]# yum install mongodb-server
Installed:
mongodb-server.x86_64 0:2.4.6-1.el6
Dependency Installed:
<snip>
Complete!
It seems like it installs with no errors.
When I start the mongod, all I get is this cryptic error.
[root@domU-12-31-39-02-19-B8 ec2-user]# mongod
mongod --help for help and startup options
mongod: symbol lookup error: mongod: undefined symbol: _ZN7pcrecpp2RE4InitEPKcPKNS_10RE_OptionsE
The only direction I see is to download the binaries directly from mongodb. Again, I would prefer the EPEL version because it contains ssl support
Is there a way to get the EPEL version to work?
This answer is more than 1 year ago, but it seems same problem is still exists. Good news is mongodb.org has a pre-compiled rpm packeages for Amazon Linux. just follows instruction on MongoDB document.
You were absolutely right in recompiling.
The error was caused by
libpcre
changing the signature ofRE::Init()
to only take astd::string
, rather than achar*
. This is fixed if you get a newer version oflibpcrecpp
, which adds the old interface for backwards compat.If you're good at deciphering C++ symbols, this is obvious.
The only difference between the names is Ss vs c, which is indicative of the argument types. Ss means
std::string
and c meanschar*
.Hope that gives you a good answer as to why this happened.
The biggest point was that I wanted the SSL option enabled. I couldn't find any simple answers, so I hope this helps anyone else venturing down this road.
The version from EPEL with the option enabled is built with an incompatible version of pcre-devel the Amazon AMI gets from the amzn1 linux repo.
I simply rebuilt the mongodb binary from the EPEL source RPM and the resulting RPM installed and worked fine.
Had to pull down other packages to do it.
The packages are posted publicly for anyone else who struggles with this and to stay consistent with the AGPL license.
It took almost 45 minutes for it to rebuild, so I put up a small repo so that I don't have to rebuild every new instance as well as some instructions if others want to use any of it.
Instructions: http://mongodb.ssl.amzn1.bauman.in
Repo file: http://mongodb.ssl.amzn1.bauman.in/mongodb.ssl.amzn1.bauman.in.repo