【问题标题】:gnu-parallel: exec: perl: not foundgnu并行:执行:perl:未找到
【发布时间】:2016-01-28 01:57:57
【问题描述】:

我有 3 个使用 OS Centos7 的 EC2 实例。 我已在其中一个实例 (server1) 上并行安装。

可以访问所以没有 SSH 问题

ssh root@ip-10-0-xx-xx.xx-xx-1.compute.internal date 给了我日期。

ssh $SERVER echo works
works

在这里,我创建了一个 ALL_SERVERS 文件,其中包含我的服务器的主机名 (root@ip-10-0-xx-xx.xx-xx-1.compute.internal)。

现在我编写了一个名为 test 的简短 bash 脚本:

#!/bin/bash
echo 'hello'

我想运行这个脚本(在 server1 上启动)。同时在 server2 和 server3 上。

parallel ./test.sh --sshloginfile ALL_SERVERS

但它只是显示Academic tradition requires you to cite works you base your article on.... 几次输入后,它显示 hello(仅在我的 server1 上)。

谁能解释我做错了什么。

编辑: 没有文件也试过了:

    parallel --sshlogin root@ip-10-0-xx-xx.xx-xx-1.compute.internal echo hello

output: bash: line 0: exec: perl: not found

我也试过这个:

parallel --tag --nonall --slf ALL_SERVERS

现在我明白了:

root@ip-10-0-0-xx.xx-xx-1.compute.internal  bash: line 0: exec: perl: not found
root@ip-10-0-0-xx.xx-xx-1.compute.internal  bash: line 0: exec: perl: not found

【问题讨论】:

  • 这些实例上似乎没有安装 perl。

标签: bash perl ssh parallel-processing centos7


【解决方案1】:

这个:

parallel ./test.sh --sshloginfile ALL_SERVERS

不等于:

parallel --sshloginfile ALL_SERVERS ./test.sh

你想要最后一个。

perl必须安装在worker上。

ssh remote perl -e \''print "OK\n"'\'

必须返回 OK。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-28
    • 1970-01-01
    • 2018-10-24
    相关资源
    最近更新 更多