You need to downgrade libssl-dev check the coin's docs/build_unix readme or other doc files for the required libssl dependency version.
otherwise try version 1.0.2g (
https://www.openssl.org/source/old/1.0.2/)
Thanks I downgraded to 1.0.2b which worked but later I received another error in regard to db-6.2.32 hence i downgraded that too till 4.8.3 now compiling again.