rsync: error while loading shared libraries: /lib64/ invalid ELF header

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/ 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/ invalid ELF header
[root@server1 ~]# rpm -qa |grep rsync
rpm: error while loading shared libraries: /lib64/ invalid ELF header


Then, run the `ldd` command to see if any shared libraries are missing/corrupted:
ldd /usr/bin/rsync
ldd /usr/local/jetapps/usr/bin/rsync
Finally, try the "file" command to identify whether the file is corrupted. 
[root@server1 ~]# file /lib64/
/lib64/ data
[root@cpanel ~]# file /lib64/
/lib64/ ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=228baad9b6b9597f71af37afacf178b46c6cf3f0, stripped
Once you've confirmed the file is corrupted, you may be able to carefully download the proper file from the public OS repository, and carefully reinstall the package. Please exercise extreme caution and only attempt this with the help of a qualified server administrator!

We found these community resources which may help resolve the issue, but any commands included are to be run AT YOUR OWN RISK:

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Rsync Backing Up Account Fails - Error: overflow

There have been some reports of accounts failing to back up with errors similar to this:[ERROR]...

Database Backup Errors: only_full_group_by

While performing a Database Backup, you may encounter the following error: Expression #1 of...

Exclude List for FTP/SFTP Destinations does not work

FTP/SFTP destinations are known to have limitations with their commands and file pathing...

Extra Backups Appearing On JetBackup

There are many reasons extra backups can appear on JetBackup. JetBackup 4 has Manual Backups and...

Files/Folders With Custom Permissions Fail Backup

When using Rsync based destinations, such as Local/SSH Destinations, there are some cases where...