「CentOS」- 使用源码包开始安装

  CREATED BY JENKINSBOT

# 构建源码包
rpmbuild –rebuild “bind-9.9.4-74.el7_6.1.src.rpm”

# 构建结果位于~/rpmbuild/RPMS中,安装
rpm -i -v –force ~/rpmbuild/RPMS/x86_64/bind-9.9.4-74.el7.1.x86_64.rpm \

~/rpmbuild/RPMS/noarch/bind-license-9.9.4-74.el7.1.noarch.rpm \

~/rpmbuild/RPMS/x86_64/bind-libs-9.9.4-74.el7.1.x86_64.rpm

错误列表

# 构建BIND时产生的一个错误

# rpm -iv –force ~/rpmbuild/RPMS/x86_64/bind-9.9.4-74.el7.1.x86_64.rpm ~/rpmbuild/RPMS/noarch/bind-license-9.9.4-74.el7.1.noarch.rpm ~/rpmbuild/RPMS/x86_64/bind-libs-9.9.4-74.el7.1.x86_64.rpm
Preparing packages…
bind-license-32:9.9.4-74.el7.1.noarch
bind-libs-32:9.9.4-74.el7.1.x86_64
bind-32:9.9.4-74.el7.1.x86_64
OSError: No such file or directory
ValueError: SELinux policy is not managed or store cannot be accessed.
warning: %posttrans(bind-32:9.9.4-74.el7.1.x86_64) scriptlet failed, exit status 1

解决办法:
未解决……

参考文献

yum Download All Source Packages (SRPM) From RedHat / CentOS WebSite
Linux : How to install source rpm on RHEL/CentOS
How to reinstall rpm package?