1

I'm looking for a distribution that allows users with no administrator rights (sudo or other) to install packages locally under their home directory. Basically Homebrew for Linux. Or, imagine if apt-get install <foo> just worked, regardless of administration rights.

There are reasons to not implement such a system, but I'm interested if anyone has released a distribution with such a feature.

Clarification: I am asking specifically about the package manager provided by the distribution. This was not clear in the original phrasing of my question. I am also not looking for hard ways to do this (e.g. chroot), nor the manual way (autotools), but a distribution that provides this as a built-in use case.

wolverian
  • 19
  • 2

2 Answers2

2

I think pretty much any distribution allows you to do that, given enough effort. Such as creating a chroot environment and installing your own instances of your favourite package manager. Or just giving the right options to the package manager.

Although to make things easier you should at least have access to the usual development tools as a regular user, such as a C compiler, (auto)make, autotools etc.

In fact a source tarball release of most packages available can be installed in your home directory independently of the rest of the system by using "./configure --prefix=/home/example".

Debian's dpkg tool for example has options such as:

   --admindir=dir
          Change default administrative directory, which contains many files that give information about status of installed or uninstalled packages, etc.  (Defaults to /var/lib/dpkg)

   --instdir=dir
          Change  default  installation directory which refers to the directory where packages are to be installed. instdir is also the directory passed to chroot(2) before running package's installation scripts, which means that the scripts see instdir
          as a root directory.  (Defaults to /)

   --root=dir
          Changing root changes instdir to dir and admindir to dir/var/lib/dpkg.

And Debian's installation process actually uses a mechanism like this, in short it boots from a ram disk and then creates some kind of chroot environment and packages in the new environment are installed using commands like:

in-target apt-get update
in-target apt-get install example

Is there anything specific you need to accomplish?

aseq
  • 4,550
  • 1
  • 22
  • 46
  • Thanks for the answer. I've clarified my question that I am looking specifically for a distribution whose built-in package manager provides this as an out of the box feature without the user having to build scaffolding around it (e.g. chroot). – wolverian Apr 28 '12 at 14:05
  • The use case is to provide an installation that allows users to install applications, but not otherwise administrate the system. – wolverian Apr 28 '12 at 14:07
0

That would be "all of them". I don't know of any distribution that doesn't allow users to install software in their home directories if they so choose.

womble
  • 95,029
  • 29
  • 173
  • 228