Error while loading shared libraries: libjli.so / Cannot Open Shared Object File

Hi,
I am building elasticsearch buildah image. I am installing elasticsearch rpm (elasticsearch-oss-7.0.1-x86_64.rpm) in my buildah script.
command: rpm --root $mnt_container -Uvh https://elasticsearch/elasticsearch-oss-7.0.1-x86_64.rpm

buring rpm installation, it throws error saying "/usr/share/elasticsearch/jdk/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory"

Error log:

Preparing... ################################# [100%] Updating / installing... 1:elasticsearch-oss-0:7.0.1-1 ################################# [100%] Failed to get D-Bus connection: Operation not permitted
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd sudo systemctl daemon-reload sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing sudo systemctl start elasticsearch.service /usr/share/elasticsearch/jdk/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory chown: cannot access '/etc/elasticsearch/elasticsearch.keystore': No such file or directory chmod: cannot access '/etc/elasticsearch/elasticsearch.keystore': No such file or directory md5sum: /etc/elasticsearch/elasticsearch.keystore: No such file or directory warning: %posttrans(elasticsearch-oss-0:7.0.1-1.x86_64) scriptlet failed, exit status 1

I found this and this link where similar issue is posted.

According to the links mentioned above, I had to copy /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/lib/amd64/jli to /etc/ld.so.conf.d/java.conf and then run "/sbin/ldconfig".

Command I used(as per the above links):

buildah copy $container $mnt_container/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/lib/amd64/jli $mnt_container/etc/ld.so.conf.d/java.conf/
and
buildah config --cmd "/sbin/ldconfig" $container

Even after trying this, I am facing the same issue.
Please help me find a solution for this issue.

Thanks,
Akshat Sharma