Mac-20180713-Mac卖萌不让装 sshpass ==..

Problem

# 1. sshpass is required
appledeMacBook-Pro:ansible xxx$ ansible -i inventory/hosts -m raw -a 'display cu' h3c
xxx | FAILED | rc=-1 >>
to use the 'ssh' connection type with passwords, you must install the sshpass program
# 2. sshpass not supported
appledeMacBook-Pro:ansible xxx$ brew install sshpass
Error: No available formula with the name "sshpass"
We won't add sshpass because it makes it too easy for novice SSH users to
ruin SSH's security.
# 3. force install sshpass failed
appledeMacBook-Pro:ansible xxx$ brew install https://raw.github.com/eugeneoden/homebrew/eca9de1/Library/Formula/sshpass.rb
######################################################################## 100.0%
Error: undefined method `md5' for #<Class:0x007fba18165bf0>
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/Users/apple/Library/Caches/Homebrew/Formula/sshpass.rb:6:in `<class:Sshpass>'
/Users/apple/Library/Caches/Homebrew/Formula/sshpass.rb:3:in `load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:26:in `module_eval'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:26:in `load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:46:in `load_formula_from_path'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:101:in `load_file'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:174:in `load_file'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:92:in `klass'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:88:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:281:in `factory'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:46:in `block in formulae'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:44:in `map'
/usr/local/Homebrew/Library/Homebrew/extend/ARGV.rb:44:in `formulae'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:122:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'

Solution

appledeMacBook-Pro:ansible zhoufen$  brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb
######################################################################## 100.0%
==> Downloading http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz
==> Downloading from https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/sshpass/1.06
==> make install
��  /usr/local/Cellar/sshpass/1.06: 9 files, 41.6KB, built in 23 seconds

References

正解:Mac 上怎么安装 sshpass 命令

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值