installing rpm files in another directory

Michael Schwendt fedora at wir-sind-cool.org
Fri Nov 12 15:27:27 UTC 2004


On Fri, 12 Nov 2004 16:06:33 +0100, Padiyath Sreekumaran wrote:

> 
>   Hello,
>   I would like to install an RPM file from my username
>   (not root) in a pre-defined directory. How can I do this?
>    What is the command I have to use? (rpm -iv........)
>   Iam using Redhat 9.0.I did the following:
>    
>   Created ~/rpm directory
>   Then BUILD, SRPMS, RPMS, BUILD, RPMS, RPMS/i386, and SOURCES

Why?

Do you refer to a "source RPM" (src.rpm) or a binary rpm? It looks
like you want to install/extract a src.rpm, but you didn't say that.

>   Directories are created in rpm. Then tried to execute the command
>   rpm -ivh filename.rpm without success. 

For src.rpms you would need to define the %_topdir macro at least,
e.g. with

  $ mkdir $HOME/rpm 
  $ echo "%_topdir     %(echo $HOME)/rpm" > $HOME/.rpmmacros

in your shell, before your user could install src.rpm packages into
a local directory.

For binary rpms, you would need to point rpm to a different root
directory, see --root option in "man rpm".

-- 
Fedora Core release 3 (Heidelberg) - Linux 2.6.9-1.667
loadavg: 2.12 2.37 1.96




More information about the redhat-list mailing list