LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Installing a RPM to a particular Directory (https://www.linuxquestions.org/questions/fedora-35/installing-a-rpm-to-a-particular-directory-464744/)

linuxnewbie82 07-17-2006 01:15 AM

Installing a RPM to a particular Directory
 
Hello folks,

will be great if u can advise me on the following :

1. How do i go about installing a package onto a particular directory?? for example, if i want to install Anaconda on my FC5 machine to the /mnt/newbie directory????

thanks heaps

newbie

unSpawn 07-17-2006 04:11 AM

How do i go about installing a package onto a particular directory?
With RPM-based distro's it's called "relocation". Using the flag as "rpm -i some.rpm --relocate /usr/local=/usr" will try to relocate files that should be installed in /usr/local(/bin,/lib,/etc,/etc) to /usr(/bin,/lib,/etc,/etc). Not all packages are built with relocation in mind. Relocating files may make files inaccessable unless you know how to combat that.


for example, if i want to install Anaconda on my FC5 machine to the /mnt/newbie directory?
I wouldn't do that because you're messing up your file hierarchy (FSSTND or FHS or what its called) making your box less managable. For instance if the package contains libraries they won't be found unless you add them to /etc/ld.conf and run ldconfig. Binaries won't be found unless you call them directly or add the directory to your $PATH. Maybe you should tell us the reasons *why* you think you must exile that package to virtual Siberia?

linuxnewbie82 07-17-2006 07:11 AM

hello

i'm sorry.... was just trying to follow tips on the page : http://bipolar.longbros.com/?p=10
to remaster my Fedora Cd.. Just realized that i'm misreading it... sorry for the inconvenience

unSpawn 07-17-2006 12:25 PM

Just realized that i'm misreading it... sorry for the inconvenience
NP

Valkyrie_of_valhalla 07-21-2006 12:03 PM

I don't exactly have Fedora, but in Suse the command is identical. I have just one question, and I thought it was pointless to open a new thread, as it is related to the same problem.
Is there any problem if I, for example, install games on another partition? Maybe even a windows one?
For example "rpm -i game.rpm --relocate /windows/D/games" ? Will it work? Will it have any problems?

unSpawn 07-21-2006 12:34 PM

Maybe even a windows one?
Nah, wouldn't do that.


Will it work?
Maybe.


Will it have any problems?
If it doesn't handle relocation it could have. Rpm's have to be built specifically for relocation. Querying with "rpm -qi package.rpm" should show.


I thought it was pointless to open a new thread
We at LQ don't. Your problem = your thread.

edenCC 09-15-2009 01:32 AM

I happened face this issue this forenoon, it depends on the package itself, sometimes you cannot relate a package.
I created a blog entry for this issue:
http://planet.admon.org/2009/09/rpm-...sage-examples/


All times are GMT -5. The time now is 04:00 PM.