Convert source code (tar.gz) to a RPM installable

New releases of Linux programs are generally released in the tar.gz format consisting of source code of the application. Normally you compile these programs but at times they throw some compiler errors in your face which just seem gibberish to a novice. A much easier way to install programs is when they are in the RPM package format.

Here’s a simple guide that will help you convert those source code files (tar.gz) into RPM packages –

To do this, first of all install the package checkinstall from your Linux dvd. If it doesn’t exist then yu can google for it and download it.
Then unpack your source package and cd to the directory where you unpacked the tar.gz file.
Run the following two commands:


But now instead of running make install you run checkinstall.

Answer the questions, edit some values if they are not appropriate and let the program run.
When finished, you’ll find your uninstalled RPM in /usr/src/packages/RPMS/i686

Your .rpm file is ready for future use!


About synapse
Programming, motorcycles and photography. Want to do more, but only have time for so much!

14 Responses to Convert source code (tar.gz) to a RPM installable

  1. Ian says:


  2. Marilyn W says:

    Thank you – just what I needed to know!

  3. Mahesh says:

    Thank you for your effort. Keep inspiring. 🙂

  4. mohamedabouzied says:

    u r the best

  5. jigna says:

    Rpm is successfully created but it gives error while installing it. That is:
    error: unpacking of archive failed on file /bin/ln;48b1f27c: cpio: MD5 sum mismatch

  6. Pingback: Converting .tar files into RPM - Linux - The UNIX and Linux Forums

  7. Known says:

    Круто!!! привет русско-понимающие ))))))

  8. chaisir ibnu supraja says:

    Wakakakkaka….. that’s coool….

  9. umesh says:

    Good. Thanks

  10. Kiran says:

    Good one thanks

  11. Ann I Muss says:


  12. kaveesh says:

    how to convert .tar.bz2 into.rpm plz help me out

  13. korr says:

    dzięki 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: