How to install rpm tool on Mac OS X 10.8?

I ended-up installing macports and using it to install rpm (port install rpm)

It took about an hour to compile all the dependencies, even if I do have 4 cores and a SSD.


brew install rpm will work. It downloads all the dependencies; though it takes lot of time to compile the packages


I'd recommend using something like VirtualBox and installing an rpm-based OS, assuming you're just looking to use things like rpmbuild. CentOS works nicely.


Check into getting rpm2cpio and cpio programs as noted in How to extract RPM package without installing it

Extract RPM file:

To extract an RPM file there is no option available in RPM command. But there is a small utility availble called rpm2cpio and cpio. This utility extracts the cpio archive from RPM. rpm2cpio converts the .rpm file specified as a single argument to a cpio archive on standard out.

Both are available in MacPorts, as noted in this cpio search. Additionally you could build both the programs from source manually as noted from there respective sources if you can't find a working solution on MacPorts or homebrew:

  • http://www.gnu.org/software/cpio/cpio.html
  • http://rpm5.org/