使用rpmbuild --rebuild构建qmail RPM失败,求解决方案及替代邮件系统
First off, let's walk through the most common fixes for rpmbuild --rebuild failures with this specific qmail source RPM, since you've already worked through initial dependency and environment issues:
Install all required development tools
The qmail 1.03-112patch_14_15 build relies on a full set of build utilities that might not be present by default. Run this command to install them:# For RHEL/CentOS 7 and below yum install gcc make patch autoconf automake rpm-build libssl-devel -y # For RHEL/CentOS 8+ dnf install gcc make patch autoconf automake rpm-build openssl-devel -yFix build directory permissions
Sometimes the source RPM extracts files with restrictive permissions that break the build. Reset permissions in your RPM workspace:chmod -R 755 ~/rpmbuild/SOURCES/qmail-*Verify patch application
The build relies on patches 14 and 15 being applied correctly. If the log shows patch failures, apply them manually before rebuilding:cd ~/rpmbuild/SOURCES/qmail-1.03 patch -p1 < qmail-1.03.patch14 patch -p1 < qmail-1.03.patch15 cd ../.. rpmbuild --rebuild qmail-1.03-112patch_14_15.src.rpmResolve conflicting mail packages
Existing mail servers like sendmail or postfix can conflict with qmail's build process. Temporarily remove them:systemctl stop sendmail postfix yum remove sendmail postfix -y
If you share the exact final error output from your build log, we can pinpoint the issue even more precisely—common late-stage failures include SELinux policy blocks or missing library headers for TLS support.
内容的提问来源于stack exchange,提问作者Alan Wong

