In general, errors related to shared libraries indicate major problems with the server preventing JB5 or rsync from functioning properly. If you're encountering the error with rsync, first you must identify which server (source or remote) is encountering the shared library error, because rsync on the sending side will return the same error that was sent by the remote server.
[11/Mar/2023 21:11:50 +0000] [PID 23056] [ERROR] rsync:
error while loading shared libraries: /lib64/libpopt.so.0: invalid ELF header
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: remote command not found (code 127) at io.c(231) [Receiver=3.2.7]
To identify if there's an error, first try running the rsync --version command on both servers. In the below example, the issue was on the destination and affected other binaries on the system, such as rpm/dnf.
[root@cpanel ~]# rsync --version
rsync version 3.1.3 protocol version 31
[root@server1 ~]# rsync --version
rsync: error while loading shared libraries: /lib64/libpopt.so.0: invalid ELF header
[root@server1 ~]# rpm -qa |grep rsync
rpm: error while loading shared libraries: /lib64/libpopt.so.0: invalid ELF header
ldd /usr/bin/rsync
ldd /usr/local/jetapps/usr/bin/rsync
# CORRUPT:
[root@server1 ~]# file /lib64/libpopt.so.0.0.1
/lib64/libpopt.so.0.0.1: data
# EXPECTED:
[root@cpanel ~]# file /lib64/libpopt.so.0.0.1
/lib64/libpopt.so.0.0.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=228baad9b6b9597f71af37afacf178b46c6cf3f0, stripped
We found these community resources which may help resolve the issue, but any commands included are to be run AT YOUR OWN RISK:
https://discussion.fedoraproject.org/t/dnf-fails-to-load-librpmbuild-due-to-invalid-elf-header/82050