> trying to install courier-imap on RHES3:
It is hard to believe that this will not have 'perl' package
installed (which, of course, does NOT provide /usr/local/bin/perl)
> [SOURCES]$ rpmbuild -ta courier-imap-3.0.8.tar.bz2
> Wrote: /usr/src/redhat/SRPMS/courier-imap-3.0.8-1.3ES.src.rpm
> Wrote: /usr/src/redhat/RPMS/i386/courier-imap-3.0.8-1.3ES.i386.rpm
> Wrote: /usr/src/redhat/RPMS/i386/courier-imap-ldap-3.0.8-1.3ES.i386.rpm
> Wrote: /usr/src/redhat/RPMS/i386/courier-imap-mysql-3.0.8-1.3ES.i386.rpm
> Wrote: /usr/src/redhat/RPMS/i386/courier-imap-pgsql-3.0.8-1.3ES.i386.rpm
> Wrote: /usr/src/redhat/RPMS/i386/courier-imap-debuginfo-3.0.8-1.3ES.i386.rpm
> Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.89336
> + umask 022
> + cd /usr/src/redhat/BUILD
> + cd courier-imap-3.0.8
> + rm -rf /var/tmp/courier-imap-3.0.8-1.3ES-buildroot
> + exit 0
> [SOURCES]$ su
> [SOURCES]# rpm -Uvh /usr/src/redhat/RPMS/i386/courier-imap-3.0.8-1.3ES.i386.rpm
> error: Failed dependencies:
> /usr/local/bin/perl is needed by courier-imap-3.0.8-1.3ES
So dependncy checks picked /usr/local/bin/perl which is not provided by
any package. Where this is coming from and what for? 'rpm' checks
only things in its database so the fact that /usr/local/bin/perl
happens to exist is not relevant.
> [SOURCES]# which perl
You clearly stuck that in you PATH and _earlier_ than /usr/bin/perl.
> so what gives?
If you really want this /usr/local/bin/perl for some reasons
( export PATH="/bin:/usr/bin:/usr/bin/X11"
rpmbuild -tb courier-imap-3.0.8.tar.bz2 )
and unless something will not re-execute your startup file which
added /usr/local/bin to your PATH this likely should do it.
Also do not recommpile rpms as root. Some day badly constructed,
or even malicious, src.rpm will chomp on your behind.
OTOH if you are really sure that dependencies are really resolved
and only rpm is not aware of that then you can always add
'--nodeps' to options why installing.