我正在尝试创建一个RPM (redhat)包来在redhat系统上安装nagios。一切正常,但当我试图安装包时,我看到
失败的依赖关系:
perl (Net::SNMP)用于nagios-1-1.x86_64
我甚至不知道为什么它需要这个,它看起来不是一个必要的包对我来说。有人以前遇到过这个问题吗?
.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
听起来您在规范文件中为perl
设置了requires
。你贴出来的时候我们可以看看。
如果您运行sudo yum localinstall /path/to/your.rpm --nogpgcheck
应该在安装中为您解决这些依赖关系。