I am trying to compile and load kamailio 5.2.4 on centos 7.5.

I am getting  below errors whenever I start kamailio . I have the latest openssl and openssl-devel packages installed on my centos . Not sure what other dependencies . 

 
Not starting Kamailio SIP Server: invalid configuration fil[FAILED]
                                                           [FAILED]
0(23235) ERROR: <core> [core/sr_module.c:498]: load_module(): could not open module </usr/local/lib64/kamailio/modules/db_mysql.so>: /usr/local/lib64/kamailio/modules/db_mysql.so: undefined symbol: SSL_get_error 0(23235) CRITICAL: <core> [core/cfg.y:3508]: yyerror_at(): parse error in config file //usr/local/etc/kamailio/kamailio.cfg, line 229, column 12-24: failed to load module ERROR: bad config file (1 errors) 0(23235) INFO: <core[FAILED]sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
                                                           [FAILED]