为什么 pssh 命令不起作用?

为什么 pssh 命令不起作用?

我在 Ubuntu 11.10 x64 系统中安装了 pssh 包。我可以通过调用 parallel-ssh 来运行该程序,但是 pssh 却提示我

$ pssh
No command 'pssh' found, did you mean:
 Command 'bssh' from package 'avahi-ui-utils' (universe)
 Command 'cssh' from package 'clusterssh' (universe)
 Command 'ssh' from package 'openssh-client' (main)
 Command 'posh' from package 'posh' (universe)
 Command 'pdsh' from package 'pdsh' (universe)
 Command 'mssh' from package 'mssh' (universe)
 Command 'zssh' from package 'zssh' (universe)
 Command 'rssh' from package 'rssh' (universe)
 Command 'ppsh' from package 'ppsh' (universe)
 Command 'push' from package 'heimdal-clients' (universe)
pssh: command not found

为什么会发生这种情况?使 pssh 命令正常工作的正确方法是什么?

PS,我知道我可以创建名为 /usr/bin/pssh 的链接,链接到 /usr/bin/parallel-ssh,但对我来说,这似乎是肮脏的黑客行为。:(

答案1

至于原因,请参阅 /usr/share/doc/pssh/README.Debian。

To avoid any conflicts with the putty package, all of the programs have been
renamed.

parallel-ssh is pssh
parallel-scp is pscp
parallel-rsync is prsync
parallel-nuke is pnuke
parallel-slurp is pslurp

关于该符号链接,一个更简洁的解决方案是创建 /usr/local/bin/pssh 符号链接并让其指向 /usr/bin/parallel-ssh。除了 /usr/local/ 之外,通常最好将 /usr/ 的内容留给包管理器。默认情况下,/usr/local/bin 也是 PATH 环境的一部分。

答案2

尝试使用parallel-ssh它已重命名。

引用包装描述:

 The package contains:
 .
  - Parallel ssh (parallel-ssh, upstream calls it pssh), executes commands on
    multiple hosts in parallel
  - Parallel scp (parallel-scp, upstream calls it pscp), copies files to
    multiple remote hosts in parallel
  - Parallel rsync (parallel-rsync, upstream calls it prsync), efficiently
    copies files to multiple hosts in parallel
  - Parallel nuke (parallel-nuke, upstream calls it pnuke), kills processes on
    multiple remote hosts in parallel
  - Parallel slurp (parallel-slurp, upstream calls it pslurp), copies files
    from multiple remote hosts to a central host in parallel
 .
 These tools are good for controlling large collections of nodes, where faster
 alternatives such as gexec and pcp are not available.

答案3

有时用于启动程序的命令的名称与您安装的用于获取该程序的包的名称不同。

我最近在安装 Maze of Galious 尝试时发现了这个问题,它没有出现在游戏菜单中,我花了几分钟才发现要开始游戏我必须进入终端并输入“mog”。/轶事。

发生这种情况的原因有很多,也许名称(如我所讲的)太长,不适合用作命令的名称,也许开发人员想要的名称已经被选中,也许开发人员有脑子问题,只是想通过随意调用某个名称来迷惑你——至于原因,不必担心,如果你想“修复”它,只需使用别名或符号/硬链接即可。

如果你觉得困扰您可以向上游提交变更请求,但如果开发人员选择该名称,他/她可能有充分的理由。

相关内容