bash: line 1: rsync: command not found

The error message bash: line 1: rsync: command not found indicates that the rsync command is not installed or not available in your system’s PATH.

How to Fix This:

1. Install rsync
  • On Debian/Ubuntu-based systems:
    sudo apt update && sudo apt install rsync -y
    
  • On RHEL/CentOS/Fedora:
    sudo yum install rsync      # Older RHEL/CentOS
    sudo dnf install rsync      # Fedora/RHEL 8+
    
  • On macOS (if missing, though it’s usually pre-installed):
    brew install rsync         # Requires Homebrew (https://brew.sh)
    
  • On Alpine Linux:
    apk add rsync
    
2. Verify Installation

After installing, check if rsync is available:

which rsync

or

rsync --version
3. Check PATH (If Installation Doesn’t Resolve It)

If rsync is installed but still not found, ensure it’s in your PATH:

echo $PATH

If the directory containing rsync (e.g., /usr/bin) isn’t listed, add it:

export PATH=$PATH:/usr/bin  # Adjust the path if needed

(To make this permanent, add the line to ~/.bashrc or ~/.bash_profile.)

4. Re-run Your Command

After installing rsync, try your original command again.

Let me know if you need further help!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值