Open a RPM on a Mac?

On modern systems, the built-in tar utility supports several other archive formats including rpm. So you can extract the files from the rpm with

tar -xf foo.rpm

Note that if you've installed GNU tools, tar may invoke GNU tar instead of the one that ships with macOS, depending on which set of GNU tools and on your $PATH. You need to use /usr/bin/tar, not GNU tar.

You can install rpm through Darwin Ports or Fink or Mac Ports or even a Darwin port, rpm4darwin.

To extract files from an rpm package without installing it, you can use the companion utility rpm2cpio, e.g.

rpm2cpio foo.rpm | cpio -i -d 

There's also a portable rpm2cpio script if you don't want or can't get the version that's bundled with the rpm utility (the script may not work with older or newer versions of the rpm format though).


From the command line you can use the tar command. For example tar -tf example.rpm | less to list all of the files in the rpm.


To unpack all the files to the local directory:

tar -xvzf some.rpm

without the need to install any new tools

Tags:

Rhel

Rpm

Osx