Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 07-18-2007, 09:12 AM   #1
Registered: Jun 2003
Location: Florida, USA
Distribution: Drake 10.1 Download
Posts: 182

Rep: Reputation: 30
rpm -i --prefix=/home/user package.src.rpm doesn't work?

I'm trying to extract the contents of src.rpms to a directory other than /usr/src/redhat/SOURCES so I can view them and not impact /usr/src. --prefix and --relocate aren't working for me -- it always tries to install them in /usr/src/redhat/SOURCES:

[user@machine SRPMS]$ rpm -i --prefix=/home/user package.src.rpm
error: cannot write to %sourcedir /usr/src/redhat/SOURCES

Is there a way to extract src.rpms to your own defined directory? This is on RHEL 4.
Old 07-18-2007, 10:09 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Think of tne .rpm as an cpio archive. Use rpm2cpio to extract it whereever you want.
Old 07-18-2007, 11:28 AM   #3
Registered: Jun 2003
Location: Florida, USA
Distribution: Drake 10.1 Download
Posts: 182

Original Poster
Rep: Reputation: 30
Thanks, that worked. Weird rpm can't handle this on its own though.


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
problem in installing src.rpm package syt07 Linux - Newbie 1 06-11-2007 02:12 AM
Asking for help!!!--Installing *.src.rpm package oneononexy Fedora 3 04-22-2007 04:14 PM
How do I re-package a .src.rpm to mdk.rpm GlennsPref Mandriva 3 05-20-2006 06:41 PM
how to know a src.rpm package what support hardware platform jiawj Red Hat 1 11-21-2004 02:47 AM
.src.rpm, .i386.rpm and .i686.rpm hhegab Linux - Software 2 06-19-2003 07:19 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:50 PM.

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