nagiosgraph 安装错误

nagiosgraph 安装错误

我正在尝试安装 nagiosgraph,我的 nagios 系统运行正常。下载nagiosgraph-1.5.0.tar.gz、解压并发布./install.pl --check-prereq 它给了我

checking required PERL modules
  Carp...1.04
  CGI...3.15
  Data::Dumper...2.121_08
  Digest::MD5...2.36
  File::Basename...2.74
  File::Find...1.10
  MIME::Base64...3.07
  POSIX...1.09
  RRDs... ***FAIL***
  Time::HiRes...1.9717
checking optional PERL modules
  GD...2.30
  Nagios::Config... ***FAIL***
checking nagios installation
  found nagios exectuable at /usr/local/nagios/bin/nagios
  found nagios init script at /etc/init.d/nagios
checking web server installation
  found apache executable at /usr/sbin/httpd
  found apache init script at /etc/init.d/httpd

*** one or more problems were detected!

我验证了 nagios 配置/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg,没有出现任何错误

答案1

安装包libnagios-object-perl以及包librrds-perl

假设您正在运行 Debian。

答案2

如果你使用的是 CentOS,请按照以下步骤操作:

如果尚未安装 CPAN,请安装。

yum -y install perl-CPAN

使用 cpan 安装模块

cpan Nagios::Config

当要求安装依赖项时按“是”。

就这样,您就获得了 perl 模块。

# ./install.pl --check-prereq
checking required PERL modules
  Carp...1.11
  CGI...3.51
  Data::Dumper...2.124
  Digest::MD5...2.39
  File::Basename...2.77
  File::Find...1.14
  MIME::Base64...3.08
  POSIX...1.17
  RRDs...1.3008
  Time::HiRes...1.9721
checking optional PERL modules
  GD...2.44
  Nagios::Config...36
checking nagios installation
  found nagios exectuable at /usr/sbin/nagios
  found nagios init script at /etc/init.d/nagios
checking web server installation
  found apache executable at /usr/sbin/httpd
  found apache init script at /etc/init.d/httpd

答案3

我的解决方案是;

仅安装 yum install perl-Nagios-Object

之前:Nagios::Config...失败

之后:Nagios::Config...36

祝你好运

答案4

在进行安装 nagiosgraph 的预检查时出现同样的错误( ./install.pl --check-prereq )

/root/nagiosgraph/nagiosgraph-1.5.2 # ./install.pl --check-prereq
checking required PERL modules
  Carp...1.3301
  CGI...4.13
  Data::Dumper...2.124
  Digest::MD5...2.54
  File::Basename...2.77
  File::Find...1.14
  MIME::Base64...3.15
  POSIX...1.17
  RRDs...1.3008
  Time::HiRes...1.9721
checking optional PERL modules
  GD...2.44
  Nagios::Config... ***FAIL*** <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
checking nagios installation
  found nagios exectuable at /usr/sbin/nagios
  found nagios init script at /etc/init.d/nagios
checking web server installation
  found apache executable at /usr/sbin/httpd
  found apache init script at /etc/init.d/httpd

即使安装了所有必备软件之后,我仍然可以在网上找到:

yum install perl-rrdtool perl-GD
yum -y install perl-GD php-gd rrdtool-perl rrdtool-php rrdtool perl-CGI perl-Time-HiRes
yum install perl-Nagios-Plugin

我看到了以下页面:http://support.nagios.com/forum/viewtopic.php?f=7&t=28276 但是当按照他们的步骤修复错误时:

1) perl -MCPAN -e shell
2) install Nagios::Config

我收到另一个错误:

Checking prerequisites...
 - ERROR: Test::Exception is not installed
 - ERROR: List::Compare is not installed

ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions
of the modules indicated above before proceeding with this installation
Creating new 'Build' script for 'Nagios-Object' version '0.21.20'
Could not read '/root/.cpan/build/Nagios-Object-0.21.20-BbpgLp/META.yml'. Falling back to other methods to determine prerequisites
CPAN: Module::Build loaded ok (v0.35)
---- Unsatisfied dependencies detected during ----
----    DUNCS/Nagios-Object-0.21.20.tar.gz    ----
    Test::Exception [build_requires]
    List::Compare [build_requires]
Shall I follow them and prepend them to the queue of modules we are processing right now? [yes]

在这里,我输入了“是”,然后系统提示我输入更多依赖关系,我对所有依赖关系都回答“是”。

终于到了:

Installing /usr/local/bin/statusdat_demo.pl
  DUNCS/Nagios-Object-0.21.20.tar.gz
  ./Build install  -- OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state

cpan[2]> exit
Terminal does not support GetHistory.
Lockfile removed.
/root/nagiosgraph/nagiosgraph-1.5.2 # ./install.pl --check-prereq
checking required PERL modules
  Carp...1.3301
  CGI...4.13
  Data::Dumper...2.124
  Digest::MD5...2.54
  File::Basename...2.77
  File::Find...1.14
  MIME::Base64...3.15
  POSIX...1.17
  RRDs...1.3008
  Time::HiRes...1.9721
checking optional PERL modules
  GD...2.44
  Nagios::Config...36 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
checking nagios installation
  found nagios exectuable at /usr/sbin/nagios
  found nagios init script at /etc/init.d/nagios
checking web server installation
  found apache executable at /usr/sbin/httpd
  found apache init script at /etc/init.d/httpd
/root/nagiosgraph/nagiosgraph-1.5.2 # 

所以我可以继续安装 nagiosgraph。希望它能有所帮助。

相关内容