RPM Build Mystery-Error

Latest response

I'm in the process of upgrading a personal LAMP/Mail/DNS server from RHEL 5 to RHEL 6. As part of this process, I'm installing some mail-related services. Wanting to be able to track said software - since it's not part of the RHEL repositories - I decided that I'd create an RPM of the software and then install the RPM. The building of the RPM goes fine. However, when I attempt to install the RPM, I get an error (and failure):

# rpm -Uh /home/ferric/rpmbuild/RPMS/x86_64/dkimproxy-1.4.1-1.el6.x86_64.rpm
   error: Failed dependencies:
        perl(MIME::Entity) is needed by dkimproxy-1.4.1-1.el6.x86_64
        perl(Net::Server) is needed by dkimproxy-1.4.1-1.el6.x86_64

However, the Perl modules that the RPM install is calling out are present and found in the normal Perl module locations

# perl -MMIME::Entity -e 1
   # perl -MNet::Server -e 1

Both return null indicating that they're installed correctly. Otherwise, I'd expect an error similar to

Can't locate Net/Danish.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
   BEGIN failed--compilation aborted.

Any clues where this spurious error may be coming from (I didn't put it in my Requires: section of my SPEC file)?


Hi Thomas,



Just for us to be sure and make helping easier, can you post your spec file?


Sometimes RHEL 5 puts files in other rpms then RHEL 6 does.



Kind regards,



Jan Gerrit Kootstra

I'm new to building RPMs (finally making the conversion from making Solaris packages which are dead easy to do). So, the below is meant to be functional but not particularly elegant.:

$ cat dkimproxy-1.4.spec
%define _instpath /usr/local
%define _etcdir   %{_instpath}/etc
%define _incdir   %{_instpath}/include
%define _libdir   %{_instpath}/lib
%define _sbindir  %{_instpath}/sbin
%define _bindir   %{_instpath}/bin
%define _datadir  %{_instpath}/share/clamav
%define _mandir   %{_instpath}/share/man

Name:           dkimproxy
Version:        1.4.1
Release:        1%{?dist}
Summary:        DKIM proxy service version 1.4.1

Group:          System Environment/Daemons
License:        GPLv2
URL:            http://downloads.sourceforge.net/dkimproxy/dkimproxy-1.4.1.tar.gz
Source0:        dkimproxy-1.4.1.tar.gz
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires:  /usr/bin/perl, /usr/bin/make, /usr/bin/gcc
Requires:       perl-Crypt-OpenSSL-RSA, perl-Digest-SHA, perl-Digest-SHA1, perl-Net-DNS, perl-Net-DNS-Nameserver

                DKIMproxy is an SMTP-proxy that signs and/or
                verifies emails, using the Mail::DKIM module. It
                is designed for Postfix, but should work with any
                mail server. It comprises two separate proxies,
                an "outbound" proxy for signing outgoing email,
                and an "inbound" proxy for verifying signatures
                of incoming email. With Postfix, the proxies can
                operate as either Before-Queue or After-Queue
                content filters

%setup -q

./configure --prefix=/usr/local
make %{?_smp_mflags}



%doc %{_mandir}/*


Basically, just used RHEL 6's SPEC template functionality in `vim` to create my skeleton-spec , then added in the components installed by the package in my build-root

Hi Thomas,

Were the perl modules in question provided by RPMs, or installed via another mechanism (like CPAN)?  If they weren't provided by RPM packages, then RPM doesn't know they exist and thus the installation fails with a dependency error.  RPM can only verify dependencies that were provided by RPMs, and thus are recorded in the RPM database.


If you want your package to just check for the existence of files or other conditions outside of RPMs, you can try putting a check in %pre and exit with an error if they are not met.


[EDIT]: Sorry, I only just noticed this: "I didn't put it in my Requires: section of my SPEC file".  In that case, I can't explain this behavior.



John Ruemker, RHCA

Red Hat Technical Account Manager

Online User Groups Moderator

Ultimately, to get it to install, I just set the nodependcy-tracking option since it appeared to otherwise pass the critical/enumerated dependencies. It's a sub-optimal solution, but, the package components function as expected. Was just looking for a "clean" path.




Can you try yum localinstall "your rpm"?


See if it show the dependancies too.


It may be that it is some rpms that you named as requirements themselves require the perl modules that break the installation.



Kind regards,



Jan Gerrit Kootstra