Is there an easy way to install packages with a large dependency tree, provided that you don't have superuser access? For instance, say I wanted to install firefox. Firefox has a ton of dependencies, each of which have their own dependencies, etc. Installing these the "./configure; make; make install" way would take forever.

Is there an option I can give apt-get to make it install in a personal directory? Or is there a way to hack it to do all the heavy lifting for me?

  • try asking on www.superuser.com or if a server question specifically www.serverfault.com – Ninefingers Jan 26 '10 at 21:17

You can install individual .deb files in your home directory with:

dpkg-deb -x /path/to/some.deb $HOME

But this does not take care of the dependencies like aptitude or apt-get does.

  • I used this method to install atom for julia on my workstation. Additionally, I made an alias for atom in ~/.bashrc: alias atom="/path/to/the/executable/atom/binary/file". Then run: source ~/.bashrc, you are ready to run atom in terminal. – Good Will Feb 13 '18 at 13:22

Check out NixOs (LWN). Packages are isolated (sometimes the distribution needs to patch them) and can be installed several times, at different versions, or by different users.

jhbuild can automate a big cmmi process. But someone needs to write a moduleset (a dependency graph).

If you're going with the manual configure/make all install process, it is possible to use stow to simplify installing things in your home. Stow is helpful to install things in several prefixes but use only one prefix for dependency resolution.

dpkg can be coerced to install in a different prefix with instdir/admindir/root, but this is only useful for chroot environments.


Don't compile Firefox from source, just install a binary package into your home directory.

This Mozilla KnowledgeBase article explains how to do it. Basically you need to just extract a tarball and execute a firefox file in it; all dependencies are already included so you don't need to install anything with apt.

EDIT: No, there is no generic method exists, at least because most applications (and especially GUI ones) require much of it's associated data to be placed in well known locations like /usr/share, and it is hardcoded in it (well, it can be configured at compile time, but you don't want to recompile everything as you said in question). So you just can check for pre-compiled binary packages that search for resources in launch directory and not system ones.

  • i interpret the question to be about package management practices. i suspect Firefox is just an example, so Firefox-specific methods aren't overly useful. – quack quixote Jan 26 '10 at 22:16
  • Thanks, edited the post. Firefox info is still useful through. – whitequark Jan 26 '10 at 22:34

I think the answer is pretty much "no". First of all the package database is only accessible by root, and secondly, some/many packages have hardcoded paths that make it impossible to relocate them. Using a chroot would be a possible answer, but you also need root for that, or at least someone with root to grant you limited rights.


I believe you have to do a chroot then you can install your packages there.

ref: https://help.ubuntu.com/6.10/ubuntu/packagingguide/C/appendix-chroot.html https://wiki.ubuntu.com/DebootstrapChroot

  • root privileges are anyway required to create a chroot, so why don't just install packages instead? Apart from this, chances that your sysadmin will grant you full root privileges (or even just apt-related) are much, much less than ones for chroot. It is (almost) not dangerous for host system. – whitequark Jul 24 '10 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy