rsync: error while loading shared libraries

安装好rsync后,执行/usr/local/rsync/bin/rsync --daemon启动rsync时报错:
rsync: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory


解决办法:在/etc/ld.so.conf中加一行/usr/local/lib,运行ldconfig。再运行/usr/local/rsync/bin/rsync --daemon,就可以了。报错的原因可能之前更新过iconv库.

如果你不是root,ldconfig也运行不了的,解决的方法就是,设置环境变量 LDFLAGS=-L/usr/local/lib

你可能感兴趣的:(rsync: error while loading shared libraries)