2

I have an account on a remote GNU+Linux system that I use via SSH, I have no root access to the machine. Sometimes I need more software or newer versions than provided by system administrators, so currently I install everything I need by hand in ~/opt directory, but it's getting hard to maintain as number of packages installed increases. Is there any package manager (like apt, yum, portage) that can install stuff in my home directory instead of root?

2 Answers 2

1

I was looking for a similar thing recently, and found this blog post [1], which mentions using gentoo-prefix and nix prefix

[1] http://invalidmagic.wordpress.com/2011/01/21/running-the-nix-package-manager-in-a-prefix-as-the-home-directory/

1
  • gentoo-prefix is perfect, just what I was looking for! Mar 24, 2011 at 8:17
1

Is there any package manager (like apt, yum, portage) that can install stuff in my home directory instead of root?

While both yum (and rpm) and apt are able to install into an alternate root directory, I suspect that they still assume that they are running as root and will probably fall over and die in interesting ways if you try to run them as a non-root user.

You can simply extract files from packages into your home directory:

cd ~/mypackages
rpm2cpio /path/to/somefile.rpm | cpio -ivd

You can do the same thing with dpkg files through appropriate use of ar and tar.

There are package managers designed to do exactly what you want (e.g., epkg), but you won't actually find packages pre-built for you. These are great for managing your own collection of software if you build and install from source.

I'm going to add that your system administrators will probably frown on this. If you need more recent versions of software, you should probably work with your admins to get the resources you need or you should consider running your own development environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .