我正在尝试创建一个RPM(redhat)软件包来在redhat系统上安装nagios。一切顺利,但当我尝试安装包时,我得到了
失败的依赖项:
nagios-1-1.x86_64
需要perl(Net :: SNMP)
我甚至不知道它为什么需要这个,它看起来不是一个必要的包。以前有过这个问题的人吗?
这是.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
答案 0 :(得分:0)
听起来您的spec文件中有requires
perl
。当你发布它我们可以看看。
如果您运行sudo yum localinstall /path/to/your.rpm --nogpgcheck
,请在安装中为您解决这些依赖关系。