Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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/

share|improve this answer
    
gentoo-prefix is perfect, just what I was looking for! –  Marek Sapota Mar 24 '11 at 8:17

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.

share|improve this answer

Your Answer

 
discard

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.