Server Fault is a question and answer site for system and network administrators. 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

Is is possible to use rpm without root access?

share|improve this question
up vote 1 down vote accepted

Depending on the contents of the package you could simply extract the contents of the rpm and use it from somewhere withing your home directory. Even if it isn't flagged as relocatable. If binaries in the package have hard-coded paths, or if the application requires root access then it may not be possible.

share|improve this answer
this is actually incorrect, you can't actually run the rpm command without sudo/root access. – Jarrod Roberson Nov 11 '13 at 20:40

There are lots of answers suggesting relocatable packages. The relocation option is for administrators to choose the destination (making destination be /opt instead of /usr/local for example) and is not really for user permissions.

While it may be possible to get around some permissions issues using this method, the MAJOR problem is that when you perform rpm operations, it is modifying the /var/lib/rpm/__db.* databases that are owned root:root. So as JPerkSter said "short answer = no". Setting up sudo to allow the specific needs would probably be the best bet.

share|improve this answer

Considering all of the above, regarding relocatable builds, you could try following the instructions listed here.

rpm --initdb --root /home/username/local --dbpath /home/username/local/lib/rpm
rpm --root /home/username/local --dbpath /home/username/local/lib/rpm \
 --relocate /usr=/home/username/local --nodeps -ivh package.rpm
share|improve this answer

The RPM spec contains an option called 'relocatable'. If the rpm is built with relocatability turned on then it can be installed in a user specified directory using the '--prefix' option. So presumably an rpm could be installed locally without superuser access as long as two conditions are met:

  1. The package was originally built to be relocatable
  2. The 'rpm' binary does not attempt to add the package to the global system catalog

But, in general, no, you need superuser access to install an RPM. While the relocatable option exists, I have nearly never seen a package that has been built to support it.

share|improve this answer

Some packages are relocatable so they may work fine without root, just specify prefix when installing it: rpm -i my.rpm --prefix=/my/home/folder

If package is not relocatable you may still extract the files from RPM and try to run it. You can extract RPM files using for example:

Copy the files into your ~/ folder, add any additional dependency libraries and hope for the best. Not guaranteed but you may get some non-relocatable packages working this way.

share|improve this answer

You can force it to install under a different directory using a different dbpath. Also you should probably not run any scripts directly without checking them out.

This will put an rpm under the current directory and extract the scripts so you can edit and run them if necessary.

rpm --install --badreloc --relocate /=`pwd` -dbpath `pwd`/rpm_db --nodeps --noscripts package.rpm

rpm --query --scripts -p package.rpm > scripts.txt
share|improve this answer

You can build RPM's without root access, just do so inside your homedirectory. As far as installing RPM's, I would say the short answer = no.

share|improve this answer

Yes, but you may not want to. I have used custom puppet manifests and rpm packages to maintain software on compute clusters on which I did not have root access. In theory it is as simple as

rpm --inittb --root /foo 
rpm --dbpath /foo -i bar.rpm

However, there are quirks in how this behaves across EL4, EL5, and EL6, so you'll need a different set of steps and options for each one. I don't have that information handy anymore. Those quirks, as well as frequent RPM database issues (perhaps due to NFS), made me regret using rpm.

share|improve this answer

no its not possible rpm with out root,su or sudo access

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.