The How-To Geek Forums Have Migrated to Discourse

How-To Geek Forums / Linux

how to make rpm from .tar.gz files

(3 posts)
  • Started 9 years ago by deadend
  • Latest reply from jake
  • Topic Viewed 10381 times

Posts: 1

hello everyone....

can anyone tells me how can i make a rpms for my redhat linux. today i download one software, but this is in .tar.gz form. i don't how to make rpm form .tar.gz file....

can anyone teach me .....

thanks in advance

Posted 9 years ago
Posts: 40

It doesn't work like that. RPMs are precompiled programs for your architecture. .tar.gz is source code that you personally need to compile. run the following commands in the commandline (in the folder where your tarball (technical term for .tar.gz files) is):

(you may want to run this as root)

tar -xvzf <your tar file>
cd <directory created by tar extraction>
make install

that should install it, assuming you aren't missing any dependencies. It'll tell you when you ./configure.

Posted 9 years ago
Posts: 11

There is also a possibility that that file is a Slackware package, though those are more commonly .tgz rather than .tar.gz. It depends where you got it from. If it *is* a Slackware file, you can use the Alien program and run the following command to make an rpm: (or sudo if you don't have fakeroot)

fakeroot alien -r name.tar.gz

However, keep in mind that you rarely need to do this as you can find tons of sites filled with RPMs out there, such as RPM Find.

Posted 9 years ago

Topic Closed

This topic has been closed to new replies.