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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-04-2003, 02:14 PM
|
#1
|
Member
Registered: Jul 2003
Location: Beijing,China
Distribution: RedFlag Linux, and RedHat Linux(now)
Posts: 133
Rep:
|
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
|
|
|
08-04-2003, 02:54 PM
|
#2
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
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.
|
|
|
08-04-2003, 04:44 PM
|
#3
|
Member
Registered: Jul 2003
Location: Beijing,China
Distribution: RedFlag Linux, and RedHat Linux(now)
Posts: 133
Original Poster
Rep:
|
[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
|
|
|
08-04-2003, 04:48 PM
|
#4
|
Member
Registered: Jul 2003
Location: Beijing,China
Distribution: RedFlag Linux, and RedHat Linux(now)
Posts: 133
Original Poster
Rep:
|
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?
|
|
|
08-04-2003, 04:56 PM
|
#5
|
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185
Rep:
|
go to rpmfind.net and type that filename in
it will then give you the search results with the package that contains it.
|
|
|
08-04-2003, 05:18 PM
|
#6
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
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
|
|
|
08-04-2003, 05:19 PM
|
#7
|
LQ Newbie
Registered: Jul 2003
Location: Hellas - Crete - Heraklion
Distribution: Red Hat 9
Posts: 24
Rep:
|
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
|
|
|
08-04-2003, 05:24 PM
|
#8
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
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 05:26 PM.
|
|
|
08-05-2003, 04:40 AM
|
#9
|
LQ Newbie
Registered: Jul 2003
Posts: 2
Rep:
|
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
|
|
|
08-05-2003, 03:47 PM
|
#10
|
Member
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446
Rep:
|
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 03:50 PM.
|
|
|
All times are GMT -5. The time now is 09:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|