1

I'm trying to create an RPM (redhat) package to install nagios on a redhat system. Everything goes well but when I try to install the package I get

Failed dependencies:

perl (Net::SNMP) is needed by nagios-1-1.x86_64

I don't even know why it requires this, it doesn't look to be a necessary package to me. Anyone who had this problem before?

Here is the .spec

%define debug_package %{nil}
%define _prefix /usr/local/nagios

Summary: Nagios blabla
Name: nagios
Version: 1
Release: 1
License: PROPRIETARY
Group: Applications/Accessories
Source: nagios-1.tar.gz
Packager: Nicholas Lievens <lievens.nicholas@gmail.com>
Requires: gcc gcc-c++ glibc glibc-common glibc-devel gd gd-devel php53 php53-cli php53-mysql php53-gd php53-pdo graphviz httpd libdbi-dbd-mysql libdbi-devel mysql mysql-server mysql-devel git

%description
Nagios!
%prep
%setup
%build
make all
%install
make install
make install-init
make install-config
make install-commandmode
make install-webconf
make install-devel
htpasswd -b -c /usr/local/nagios/etc/htpasswd.user nagiosadmin nagiosadmin
%files
%{_prefix}/var
%{_prefix}/var/spool/checkresults
%{_prefix}/etc
%{_prefix}/bin
%{_prefix}/sbin
%{_prefix}/libexec
%{_prefix}/lib
%{_prefix}/include/nagios
%{_prefix}/share
Nicholas
  • 1,189
  • 4
  • 20
  • 40

1 Answers1

0

It sounds like you have a requires for perl in your spec file. When you post it we can have a look.

If you run sudo yum localinstall /path/to/your.rpm --nogpgcheck should resolve these dependencies for you in the installation.

Ewan
  • 14,592
  • 6
  • 48
  • 62
  • I updated my post with the .spec file, i'll try the yum method also – Nicholas May 13 '13 at 06:39
  • tried the yum localinstall. It downloaded some packages but after that I get the message Package nagios-1-1.x86_64.rpm is not signed – Nicholas May 13 '13 at 06:53
  • I added AutoReqProv: no . This solves it for now I think. The rpm works this way, nagios doesn't but I think we forgot some files in the .spec file – Nicholas May 13 '13 at 07:07
  • I've added a `--nogpgcheck` flag to avoid the "not signed" message. How about now? – Ewan May 13 '13 at 10:34
  • well I don't know but it worked by adding the AutoReqProv: no in .spec – Nicholas May 13 '13 at 11:12