[Nagiosplug-devel] Problem with nagios-plugin built RPM
Andreas Ericsson
ae at op5.se
Tue Dec 6 04:15:07 CET 2005
Brian Ipsen wrote:
> Hi,
>
> I'm trying to build an RPM with the nagios plugins...
>
> Basically, what I do, is:
>
> # perl -MCPAN -e 'install Net::SNMP'
> # /usr/sbin/groupadd nagios
> # /usr/sbin/useradd -r -d /var/log/nagios -s /bin/sh -c "nagios" -g nagios
> nagios
> # cd /usr/src/whitebox/SOURCES
> # wget
> http://surfnet.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.
> 2.tar.gz
> # tar xzpf nagios-plugins-1.4.2.tar.gz *.spec
> # mv -f nagios-plugins-1.4.2/nagios-plugins.spec ../SPECS/
> # rm -Rf nagios-plugins-1.4.2
> # cd ../SPECS
> # chown 0.0 nagios-plugins.spec
> # rpmbuild -ba nagios-plugins.spec
> # rpm -Uvh ../RPMS/i386/nagios-plugins-1.4.2-1.i386.rpm
>
> But this gives me:
>
> error: Failed dependencies:
> perl(Net::SNMP) is needed by nagios-plugins-1.4-2.1.el3.rf.i386
>
> I then check:
>
> # perl -MCPAN -e 'install Net::SNMP'
> CPAN: Storable loaded ok
> Going to read /root/.cpan/Metadata
> Database was generated on Tue, 06 Dec 2005 01:01:00 GMT
> Net::SNMP is up to date.
>
> Why is it complaining about Net::SNMP ??
>
> I also tried:
>
> # rpm -qa | grep net-snmp
>
> net-snmp-libs-5.1.2-11
> net-snmp-devel-5.1.2-11
> net-snmp-perl-5.1.2-11
> net-snmp-utils-5.1.2-11
> net-snmp-5.1.2-11
>
> Where is the problem ??
>
rpm -qa | grep ^perl | grep -i snmp
and you'll know. You can't mix rpm-packages with manual installations,
or you'll run into these problems.
What you *should* have done is
yum install nagios nagios-plugins
(or whatever's appropriate for your system). This is supposed to pull in
the required packages for you.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
More information about the Devel
mailing list