LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-04-2003, 01:14 PM   #1
gexiaofei
Member
 
Registered: Jul 2003
Location: Beijing,China
Distribution: RedFlag Linux, and RedHat Linux(now)
Posts: 133

Rep: Reputation: 15
How to install src.rpm


I am now using RedHat. And I want to install mplayer. I've got mplayer-0.90.20030530-1.src.rpm.
I dont know how to install src.rpm. Would someone please tell me what to do?

Thanks.

xiaofei
 
Old 08-04-2003, 01:54 PM   #2
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
src.rpms are SOURCE rpms.

If you just want to install a pre-compiled binary, then you must not user a src.rpm. just regular i386.rpm, or whatever.rpm.

If you want to use the SOURCE rpm to do a compilation yourself, then

rpm -ivh archive.src.rpm

Then you have to cd /usr/src/redhat

The source code archive is in /usr/src/redhat/SOURCES, in the form of a tar.gz archive. If you wish you can unpack that and manually do the installation to wherever you want.

If you just want to initiate the "automated" process, then you would

cd /usr/src/redhat/SPECS

and do

rpmbuild -bb package.spec

This will then initiate an automagic unpacking of the archive, compilation, and building of an rpm all ready for you to install, with the usual

rpm -ivh package.rpm

The built rpm is put into the appropriate /usr/src/redhats/RPMS/ subdirectory as far as I recall.

man rpmbuild

for all the gory details.
 
Old 08-04-2003, 03:44 PM   #3
gexiaofei
Member
 
Registered: Jul 2003
Location: Beijing,China
Distribution: RedFlag Linux, and RedHat Linux(now)
Posts: 133

Original Poster
Rep: Reputation: 15
[root@xiaofei software]# rpm -ivh mplayer-0.90.20030530-1.src.rpm
error: cannot create %sourcedir /usr/src/redhat/SOURCES


I tried as you said. But it showed me as above. Should I make a redhat/SOURCES folder myself?

Thanks.

xiaofei
 
Old 08-04-2003, 03:48 PM   #4
gexiaofei
Member
 
Registered: Jul 2003
Location: Beijing,China
Distribution: RedFlag Linux, and RedHat Linux(now)
Posts: 133

Original Poster
Rep: Reputation: 15
And by the way, how can I find what package can supply the file needed by another package. For example, I want to install x.rpm, It tells me that y.o is needed. What command can help me to find out what package can give me y.o?
 
Old 08-04-2003, 03:56 PM   #5
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
go to rpmfind.net and type that filename in
it will then give you the search results with the package that contains it.
 
Old 08-04-2003, 04:18 PM   #6
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Quote:
Originally posted by gexiaofei
[root@xiaofei software]# rpm -ivh mplayer-0.90.20030530-1.src.rpm
error: cannot create %sourcedir /usr/src/redhat/SOURCES
I tried as you said. But it showed me as above. Should I make a redhat/SOURCES folder myself?
$> rpm -qf /usr/src/redhat/SOURCES

rpm-build-4.2-0.69

You need to install the package rpm-build and it will create the directories
under /usr/src/redhat for you.

And obviously if you do not install rpm-build, you will not be able to use

rpmbuild -bb package.spec
 
Old 08-04-2003, 04:19 PM   #7
Disruptor
LQ Newbie
 
Registered: Jul 2003
Location: Hellas - Crete - Heraklion
Distribution: Red Hat 9
Posts: 24

Rep: Reputation: 15
And something else: A faster way to compile an src.rpm package is:

rpmbuild --rebuild <package.src.rpm>

rpmbuild takes over for all what needs to be done. Hope you find it
useful.

Cheers,
Dominique
 
Old 08-04-2003, 04:24 PM   #8
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
It is not considered good NETIQUETTE to post non related questions in a thread.

You should install the RedHat RPM database

rpmdb-redhat-9-0.20030313

This contains the rpm information for all of the available RedHat 9 rpms, unlike the copy you have in /var/lib/rpm which just has the information about which rpms you have installed.

Once you have done that, in your .profile put

RPMDB="/usr/lib/rpmdb/i386-redhat-linux/redhat"
export RPMDB

and then when faced with the problem of what provides glibc demanded by some package

rpm -q --dbpath $RPMDB --whatprovides glibc

and you will get the answer as to which RedHat 9 package you need to also install.

And if you want to be really clever, and you are using bash, you can
of course create an alias for the above so you just need to type

whatprovides glibc

Last edited by Corin; 08-04-2003 at 04:26 PM.
 
Old 08-05-2003, 03:40 AM   #9
andihp
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Rep: Reputation: 0
source rpm options

Hi,
how do we list what rebuild options are available for a ..src.rpm ?
Just like when we do ./configure --help ?


TIA,
andi
 
Old 08-05-2003, 02:47 PM   #10
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Have you tried

man rebuild

But actually you are locked into the options specified in the SPEC file, contained in the src.rpm.

So that is what you would have to edit in order to change compilation options. And to get to that file, you follow the instructions previously posted above.

Last edited by Corin; 08-05-2003 at 02:50 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
install src.rpm ust Linux - Software 7 10-13-2005 08:34 AM
how to install a .src.rpm labced501 Mandriva 11 10-07-2004 03:59 PM
Can't install src.rpm corbis_demon Linux - Newbie 4 06-30-2004 01:09 PM
how to install *.src.rpm vanhelsing Linux - Software 1 06-10-2004 08:35 AM
rpm install from src kcella Linux - Software 2 11-19-2003 05:19 PM


All times are GMT -5. The time now is 06:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration