RPM Build Mystery-Error
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)?
Responses
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.
Regards,
John Ruemker, RHCA
Red Hat Technical Account Manager
Online User Groups Moderator
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
