RHEL8 (CentOS8):使用 perl 编译 nagios-plugins 错误



我正在尝试在 RHEL8 框中编译 nagios 插件,但它失败并在运行时报告错误消息tools/build_perl_modules

make[2]: Entering directory '/root/nagios-plugins-2.2.1/perlmods'
../tools/build_perl_modules -d /usr/local/nagios/perl -em .
make[2]: ../tools/build_perl_modules: Command not found
make[2]: *** [Makefile:1462: all-local] Error 127
make[2]: Leaving directory '/root/nagios-plugins-2.2.1/perlmods'
make[1]: *** [Makefile:1431: all-recursive] Error 1
make[1]: Leaving directory '/root/nagios-plugins-2.2.1'
make: *** [Makefile:1352: all] Error 

前段时间我在 RHEL5、RHEL6 和 RHEL7 中编译了这些相同的 nagios 插件,没有问题。

tools/build_perl_modules确实存在:

# ls -l tools/build_perl_modules
-rwxr-xr-x 1 root root 9999 Jun 16 12:27 tools/build_perl_modules

事实上,当启动那个perl程序时:

# ../tools/build_perl_modules -d /usr/local/nagios/perl -em .
-bash: ../tools/build_perl_modules: yes: bad interpreter: No such file or directory

这条消息是因为社邦线

#!yes
# SYNTAX:

这对我来说很奇怪。然而,它在以前的 RHEL 版本中有效!

此致敬意

安装perl-Module-Build后,错误消息消失了。

请安装 Nagios PL

DNF 安装 nagios-plugins-all

最新更新