Click to See Complete Forum and Search --> : *.src.rpm


azizastock
11-28-2001, 06:39 PM
Would someone please advise me how to install a sr.rpm package.
Running redhat 7.2
thanks :o

deadlock
11-28-2001, 08:18 PM
SRC.RPMs are source packages and are installed the same way as normal RPMs: rpm --install package.src.rpm. Because they are source, they are installed to a directory under /usr/src - the full path is something along the lines of /usr/src/redhat/source/. If you cd to this directory, you'll find another directory that corresponds to the package you just installed. Cd into this one and you'll find all of the source code etc. for the package.

I presume you know how to compile and install source ?

Incidentally, what I've outlined above is what happens when you install the *.src.rpm files from your RedHat disk - non-RedHat-official src.rpms might install to a different location, but it'll almost always be under /usr/src.

[ 28 November 2001: Message edited by: wonk ]

azizastock
11-28-2001, 09:40 PM
Thanks for the response but I am completely newto linux. Can you give me a blow by blow description? I do know how to cd into the various directories.
Thanks again

David Dorward
11-29-2001, 03:53 AM
Something like this should work. Use "ls" to get a directory listing to make sure I've got the paths correct (I gave up Red Hat a few months ago).

rpm -Uvh mySource.src.rpm
cd /usr/src/redhat/SPECS
rpm -ba mySource.spec
cd /usr/src/redhat/RPMS
rpm -Uvh mySource*.rpm

deadlock
11-29-2001, 06:18 AM
Right, src.rpms don't contain programs - they contain the original source files and code that those programs were compiled from. If you type ls, you'll see a loads of files - one of these will be called configure. This is the configuration script - if you run it (./configure) it will check your system to make sure that all of the required libraries etc. are present. Assuming that that goes okay, you normally type make to compile the source code, followed by make install to actually install the resulting files. Note that this process can vary wildly between sources - the best thing is to read the README and INSTALL files in the package's main directory.

Unfortunately I know very little about debugging source code, so if there's a problem with any of the scripts etc., then I am as stumped as you are! But there are plenty of people here who are willing to help and some of them even can!

bdg1983
11-29-2001, 08:47 AM
You may prefer to get the binary package of the rpm program you are looking to install.

packagename-#.#.#.i386.rpm

The i386.rpm would indicate a binary package and would be installed using either

rpm -Uvh packagename-#.#.#.i386.rpm

which would upgrade the previous installed version of this package, or use

rpm -ivh packagename-#.#.#.i386.rpm

to install package that has never previously been installed.

To compile a source rpm package into a binary rpm package, you can use

rpm --rebuild packagename-#.#.#.src.rpm

and if the build is successful, you can then install the resulting binary package using the suggestions above.

azizastock
11-29-2001, 02:25 PM
Thanks to you all for your responses. Followed your advice and it worked perfectly.
:D