

Note: You may have this package already installed. To get results as desired, you should also install it in the same fashion as noted above, substituting the new package ~]$ sudo yum install redhat-rpm-config Most SRPMs targetted to be rebuilt on CentOS also need certain rpmbuild build macros and helper scripts, which are contained in package: redhat-rpm-config. Verify that yum listed a version of the rpm-build package in the list of packages to install, and answer "y" to allow yum to go ahead and install the package.Īfter yum is finished, run the rpmbuild -showrc or the more terse rpmbuild -version command to check that it is installed. Note: That for historical reasons, the package containing /usr/bin/rpmbuild is called rpm-build (that is, with a dash in the package name). You can install it with yum by running the following command as ~]# yum install rpm-buildĪs becoming root for running a command is only logged in the bash history file, most careful admins set up and use sudo for the task ~]$ sudo yum install rpm-build

If the system returns: $ rpmbuild: command not found this means rpmbuild is NOT yet installed. A large set of data should be displayed, enumerating details of the build environment that rpmbuild is using. To check that it is installed and, issue the rpmbuild -showrc command. This is the tool you will use to build RPMs from specfiles or SRPM packages. You have been warned.įirst, you should check that you have rpmbuild installed on your system. Building RPMs as root might damage your system. It should ALWAYS be done with an unprivileged user. This document will guide you on how to install and configure an environment to build RPMs (and rebuild SRPMs) under CentOS.īuilding RPMs should NEVER be done with the root user. Set Up an RPM Build Environment under CentOS
