rpm without root

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.


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.


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

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:

  • rpm2cpio
  • or midnight commander

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.