bash: line 1: rsync: command not found

CentOS Stream 9 Rocky Linux 9 Rocky Linux 运维 · systemofdown · 于 2个月前 发布 · 305 次阅读

背景

在使用rsync做文件同步,从本机同步到远程服务器时,命令如下:

rsync  -av /srv/ root@10.0.20.5:/srv/

结果发生了指令不存在的错误,提示内容如下:

bash: line 1: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.3]

原因

不仅源服务器需要安装rsync,而且在目标服务器上也需要安装rsync

解决

在目标服务器上安装rsync

 dnf -y install rsync
共收到 0 条回复
没有找到数据。
添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册