Makefile 和 rsync 错误 : Failed to exec ssh: No such file or directory

标签 makefile rsync

我正在尝试使用 rsync 和 makefile 将 mac 上的本地文件发布到我的服务器。
运行 make 命令时出现以下错误:

rsync: Failed to exec ssh: No such file or directory (2)  
rsync error: error in IPC code (code 14) at /SourceCache/rsync/rsync-42/rsync/pipe.c(86)   [sender=2.6.9]  
rsync: connection unexpectedly closed (0 bytes received so far) [sender]  
rsync error: error in IPC code (code 14) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]  
make: *** [deploy] Error 14  

奇怪的是,如果我直接在 shell 中输入 rsync 命令,它就会起作用。

下面是 makefile 中有趣的部分:
USER = admin  
SERVER = 92.243.xx.xx  
PATH = d_ghost1/www/sub.domain.de/htdocs/  

deploy:  
    /usr/bin/rsync -avz \  
    --exclude '.git*' \  
    --exclude '.DS*' \  
    --exclude '*.log' \  
    --exclude 'config.ini\*' \  
    --exclude 'backend/config.ini\*' \  
    ./{assets,backend,frontend,templates,waffle} $(USER)@$(SERVER):$(PATH)  

任何人都可以理解这一点吗?
谢谢,
卢茨

最佳答案

我最近在 Ubuntu 18.04 docker 镜像上遇到了同样的错误。按照建议安装 openssh-client 软件包 here为我解决了问题。
sudo apt install -y openssh-client

关于Makefile 和 rsync 错误 : Failed to exec ssh: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19260675/

相关文章:

backup - rsync 的替代品?

c++ - Boost::Python 静态链接

c++ - 在 C++ 中查找函数定义

variables - makefile:先决条件 $(variable) 中的 % 模式

rsync - 让 rsync 只报告更新的文件

python - 连续获取输出: rsync info=progress2 call in python script

c++ - Ubuntu Linux 上的 Makefile C++11 错误

c++ - Makefile:将库添加到另一个项目

rsync - 为什么 rsync 使用没有 p 选项的 mkdir

php - ssh 使用rsync 并备份到本地