天天看点

mac笔记--csshX failed--compilation aborted at /usr/local/bin/csshX line 1130

mac笔记--csshX failed--compilation aborted at /usr/local/bin/csshX line 1130

  • ​​介绍​​
  • ​​操作​​
  • ​​说明​​

介绍

笔者最近将 mac 升级到最新版本 Big Sur,导致 csshX 无法正常使用。查看文档发现是 perl 版本不兼容导致的,因此需要更改当前perl 版本然后即可恢复正常。

报错内容如下:

mac笔记--csshX failed--compilation aborted at /usr/local/bin/csshX line 1130
xg@xgmac Desktop % cssh 10.120.75.102
zsh: command not found: cssh
xg@xgmac Desktop % csshX 10.120.75.102
Unimplemented: POSIX::tmpnam(): use File::Temp instead at /System/Library/Perl/5.28/darwin-thread-multi-2level/POSIX.pm line 185.
Unimplemented: POSIX::tmpnam()      

操作

1)查看当前版本,发现是 5.28

xg@xgmac Desktop % perl --version                                              
This is perl 5, version 28, subversion 2 (v5.28.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)      

2)更改为5.18

xg@xgmac Desktop % defaults write com.apple.versioner.perl Version -string 5.18
xg@xgmac Desktop % perl --version
This is perl 5, version 18, subversion 4 (v5.18.4) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)      

3)再次 csshX 10.120.75.102

已经可以正常使用cssh了

说明