install software in linux as a non root user

2

What is the best way to install software in a linux machine if you dont have root permissions. I know that we can use few variables like PKG_CONFIG_PATH and switches like --prefix with configure to get a software installed in a local directory, but sometimes when there are recursive dependencies it is becoming tough for me to install all the packages manually. Is there a better automated way?

Update: What i meant by recursive dependencies is: to install package A, i should install package B, which in turn requires package C to be installed

SAN

Posted 2010-12-28T13:59:28.517

Reputation: 325

Just a point of clarification, those aren't "recursive dependencies." That would be something like Package A needs Package B, which needs Package C, which needs Package A. What you're referring to is commonly known as "dependency hell" (and can get A LOT worse than what you've outlined). – David – 2010-12-28T14:03:04.103

There is no silver bullet, sadly. – ismail – 2010-12-28T14:07:34.023

Answers

0

The obvious answer is to install from source, which doesn't help with dependencies at all.

Installing from an RPM package repository is out of the question, because those packages install files into "common" directories such as /usr/bin, and other users would expect that only root can install there. What you would need, in theory, is a repository of packages that are built to install into places where you have write access or are relocatable there, and then you'd use a (possibly patched) package manager with a nonstandard data directory. But such a repository (probably) doesn't exist.

The the bottom line is that this won't really work reasonably. To manage the software on a Linux system you need root access, or at least special arrangements with root so that you can reign in your own little realm, but even that is difficult to do safely.

Peter Eisentraut

Posted 2010-12-28T13:59:28.517

Reputation: 6 330

0

It is possible to use rpms even if you're not root. I know that for a fact since I was looking for it a while back see here for an example. However, it was not worth the trouble, since it essentially means almost the same amount of work as --prefix-ing it all the way down. I suggest that if some of the packages you want are very basic, you ask your admin to get those, and install the rest on your own.

Dr_bitz

Posted 2010-12-28T13:59:28.517

Reputation: 314