How do you unpack an rpm without installing it?

Is there anyway to unpack or extract an rpm without installing it? I have tried to install an application written in python but it’s not working. I have found a Mandriva rpm of the application so I want to look inside to see how it would install the files where it would place everything and compare with what I have.

I know file the directory structure may be slightly different but it’ll still give me an insight as to what and where everything is supposed to go.

Hi
Create a temporary directory and if you use Gnome, just right click and
extract here. Else run the following from the command line in the
temporary directory with the rpm;


rpm2cpio <name_of_rpm> | cpio -idmv

Probably linked in the scripts to 2.5 or 2.6 rather than using just
python. Your on a 64bit system?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 5 days 22:44, 4 users, load average: 0.05, 0.09, 0.13
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

file-roller (a Gnome package I think) can also just open them directly
like other archives… right-click, Open with File Roller.

Good luck.

malcolmlewis wrote:
>

> Hi
> Create a temporary directory and if you use Gnome, just right click and
> extract here. Else run the following from the command line in the
> temporary directory with the rpm;
>


> rpm2cpio <name_of_rpm> | cpio -idmv
> 

> Probably linked in the scripts to 2.5 or 2.6 rather than using just
> python. Your on a 64bit system?
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJLIUZMAAoJEF+XTK08PnB5H0wP/3BHdD3FHHFSauD/fm59r1zD
6WhlvV7jrLRQKeKLvOwhegEEBD/YYfoCDvqMNzXCsSKFllw8gcS36avs2oy7srlh
BIsqsF1RPGs/45pLxpb/XoKvO5cJ6+60eT+s31vh9NQU2fz1tbt8/+uh120gmQaN
fQEDZlINwLgzmmfSYTk1/uXKy2ll4+g9EHAYc+MZaLN+vY+ZjedhNB/guNVE1SYk
Og/WjoffD5/Dees3YEn1tN99CGM8kq7JqVdJvu2vGI9Tf9Dw6OkVztCwDgmOqvd7
AVbh+chU0zsMvEOSkAZ4fdI3Rmj78WuWO9FtLeTnaASOwD0Ybi6LQzsv39/F4Axf
Ygh28Q5+z0+4WNLMVRL4Wy8RoP0Znv7IV1o0NOovIxs+KCjkF/Q2a5He684ln7tB
jk8QoYp2nvELcGVmSVQwdZZk5KGg3BdCii2lV97Odd0YoC/vEWlRc46h+cdOY0UR
ZXaP0IlZUw5WDMZSieAq1C202QQRJMe3gqDqKFF620WKw37yIPIy23JwCjNyQxj0
+/waKlu96SbkuxK1pVhlvOarU9eVryX+gem88YHmOtvzbs28rvsHY9j38Gx2zEh2
uT8iOWMlu292/xV9NalUJd5IPZiFZfp8Fk/+67LVN8svTQYrZyT2B+RtjUgAfMoC
GJXJ7zSX1waJA1PD8Hfn
=H4wr
-----END PGP SIGNATURE-----

Thanks. I don’t use Gnome so will do it from cli. I’m experimenting in a VM on a 32bit system (my laptop) but it will eventually go onto a 64bit machine.

You can use krusader. It’s a KDE file manager (kind of Windows/Total Commander clone) . It opens rpms like other archives as directories and let you extract files as you would copy them from a directory. It’s very useful. You’ll like it.

You don’t even need to unpack it to see the paths. Just do:

rpm -qlp foobar.rpm