Unable to load dynamic library 'mongodb.so' - undefined symbol: OPENSSL_sk_num

1.3k views Asked by At

I am trying to load mongodb.so module with Apache/2.4.6 on CentOS 7.3, the commands will tell you more about the versions of the packages I have managed to install so far.

[root@SRVKL-04 ~]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 14 2016 18:04:44

[root@SRVKL-04 log]# php -v
PHP 5.5.38 (cli) (built: Jul 21 2016 12:25:20)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies


[root@SRVKL-04 ~]# vim /etc/centos-release
CentOS Linux release 7.3.1611 (Core)


[root@SRVKL-04 ~]# mongod --version
db version v3.4.1
git version: 5e103c4f5583e2566a45d740225dc250baacfbd7
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
    distmod: rhel70
    distarch: x86_64
    target_arch: x86_64


[root@SRVKL-04 log]# openssl version
OpenSSL 1.1.1-dev  xx XXX xxxx


[root@SRVKL-04 log]# rpm -qa | grep -i openssl
openssl-libs-1.0.1e-60.el7.i686
openssl-libs-1.0.1e-60.el7.x86_64
openssl-1.0.1e-60.el7.x86_64
xmlsec1-openssl-1.2.20-5.el7.x86_64
openssl-devel-1.0.1e-60.el7.x86_64


[root@SRVKL-04 log]# ldd /usr/lib64/php/modules/mongodb.so
        linux-vdso.so.1 =>  (0x00007ffd877fa000)
        libssl.so.10 => /lib64/libssl.so.10 (0x00007feea6d57000)
        libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007feea696d000)
        librt.so.1 => /lib64/librt.so.1 (0x00007feea6764000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007feea6548000)
        libc.so.6 => /lib64/libc.so.6 (0x00007feea6187000)
        libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007feea5f38000)
        libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007feea5c51000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007feea5a4d000)
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007feea581a000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007feea5616000)
        libz.so.1 => /lib64/libz.so.1 (0x00007feea5400000)
        /lib64/ld-linux-x86-64.so.2 (0x00007feea72a9000)
        libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007feea51f0000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007feea4fec000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007feea4dd2000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007feea4baa000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007feea4949000)

Whenever I try to start httpd (apachectl restart), I get the following error messages in the logs:

[Thu Dec 22 11:08:39.031739 2016] [suexec:notice] [pid 24770] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::250:56ff:feb9:483f. Set the 'ServerName' directive globally to suppress this message
[Thu Dec 22 11:08:39.051342 2016] [auth_digest:notice] [pid 24770] AH01757: generating secret for digest authentication ...
[Thu Dec 22 11:08:39.051857 2016] [lbmethod_heartbeat:notice] [pid 24770] AH02282: No slotmem from mod_heartmonitor
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mongodb.so' - /usr/lib64/php/modules/mongodb.so: undefined symbol: OPENSSL_sk_num in Unknown on line 0
[Thu Dec 22 11:08:39.067134 2016] [mpm_prefork:notice] [pid 24770] AH00163: Apache/2.4.6 (CentOS) PHP/5.5.38 configured -- resuming normal operations
[Thu Dec 22 11:08:39.067158 2016] [core:notice] [pid 24770] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

As the issue is related to OPENSSL, I have posted the OpenSSL recompilation issue on their GitHub page for more details.

If I replaced mongodb with mongo, the error changes as in this post

The question is what have I missed? Is it a compatibility problem?

0

There are 0 answers