SEARCH

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 6 years ago by deadend
  • Latest reply from jake
  • Topic Viewed 10381 times

deadend
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 6 years ago
Top
 
blastph3my
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>
./configure
make
make install

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

Posted 6 years ago
Top
 
jake
jake
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 6 years ago
Top
 



Topic Closed

This topic has been closed to new replies.

Enter Your Email Here to Get Access for Free:

Go check your email!