Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a shared location, let me call it /tp I want to install all my libraries and packages in this location just like the default install. Reason to do this is: I want all the users in the network connected to this server to link their programs to this particular location to pick up libraries for the program. Could someone help me do this.

The closest I came to was using (for example) yum install boost --installroot=/tp/. This did not work as the yum started looking for mirror list in this location. I want the installation to be done in the location /tp/

Your help will be much appreciated. This is a set up I am doing for a college to promote Linux use in their labs.

share|improve this question
up vote 1 down vote accepted

the installroot tool is usefull for situations like installing packages into a chroot environment. try installing all the yum configuration and repo files into /tp, keeping their respective paths, and your custom package installation will work. (eg: /tp/etc/yum.conf).

in such a case /tp will be prepended to any files that are read or written by yum. that includes configurations files, yum log files, repository information, etc.

share|improve this answer

From the rpm man page:

   --prefix NEWPATH
          For relocatable binary packages, translate all file  paths  that
          start  with  the  installation  prefix in the package relocation
          hint(s) to NEWPATH.

   --relocate OLDPATH=NEWPATH
          For relocatable binary packages, translate all file  paths  that
          start with OLDPATH in the package relocation hint(s) to NEWPATH.
          This option can be used repeatedly if several OLDPATH's  in  the
          package are to be relocated.
share|improve this answer
--prefix does not seem to exist w/ yum (at least on CentOS 6.4 x64) – Doktor J Mar 11 '14 at 23:35
The answer says this is for rpm, not yum. – Mark Lakata Dec 2 '15 at 2:50

You could just chroot /tp/ to change your root into that location. Then re-try you yum installation.

This is common for LIVEOS, say for prototype/test run requiring large package installation, whereas the pre-designed RAMDISK is allocated small in that particular location.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.