Welcome to the Linux Foundation Forum!

RPM Installation in different directory

Hi,

Suppose I need to install rpm file in /opt.

I tried with rpm --prefix=/opt/ unrar.*****.rpm

I get this statement

rpm: --prefix may only be used when installing new packages

...How to go about this?

P.S (By default it is installed in /usr/bin/unrar)

Thanks

Comments

  • An RPM package that can be installed into a different directory is called relocatable. It is necessary to find out whether this rpm is relocatable / not.... To check this type as: rpm -qpi filename.rpm | grep Relocations and also again type as: rpm -qi bash | grep Relocations, if it shows dir name like /opt or /usr or other name then it can be install in different dirs. Almost ur command is ok, actual the syntax is like: rpm --prefix=/opt/unrar*.rpm !
  • Posts: 10
    @rechil_colin
    Thanks for your quick response.
    This is what I get
    #rpm -qpi unrar-3.6.2-1.el4.rf.i386.rpm | grep Relocations
    warning: unrar-3.6.2-1.el4.rf.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6Name : unrar Relocations: (not relocatable)
    # rpm -qi bash | grep Relocations
    Name : bash Relocations: /usr

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training