Is there any way to get APT to install packages to my home directory?
I don't want to make changes system wide.
Alternatively, are there any home-directory based linux package managers?
|
|
Dpkg do not have the --relocate feature that RPM has. It's worth considering how many RPM packages support that feature though. Basically, it can't be done. What you could do is use a chroot if you want to test something before installing it globally on the system. To do this, you need to be able to get access to root. The first thing to do is to create a basic chroot: # debootstrap lenny lenny-chroot This creates a Lenny chroot inside the lenny-chroot directory. Now we can enter the chroot:
Now we can do what ever we want and install anything without it messing up the rest of the system. When we're done, just type exit or press ctrl-D |
||||
|
|
|
Gentoo prefix does exactly what you want. It installs all packages into a specified directory. No root access required. If you want to get rid of it, just remove the base directory.
|
||||
|
|
I usually get the sources and check out a file like "INSTALL". Usually there are instructions to do |
||||
|
|
|
Just as a minor addition to the option of compiling it, there's the half-way option of compiling into a package with a different prefix option at compile time (with "checkinstall" or perhaps some other method). The advantage is that the package will appear on package managers such as aptitude or synaptic. Besides that I think it may be possible in some cases to download the actual .deb and force a different prefix via dpkg install, but I think that it's not something that can be done with any random package, but they got to have been compiled with some variable for their location (rather than the literal explicit prefix) that you'd export before installing. I don't know anything about the procedure though, google for "dpkg instdir prefix". |
||||
|
|
|
Rootless GoboLinux can do exactly what you're asking for: package manager, with no elevated privileges, in your own home directory. Hopefully you know what you're doing; rootless isn't the most well-maintained installation mode of Gobo, and when I used to use it a few years ago it required a few tweaks as the installation script was a bit out of date relative to other Gobo changes. There's also klik which repackages quite a few |
||||
|
|
|
No, I don't think you can. The best I can think right of now is to use Another one is to use |
||||
|
|
|
There's very few cases where you'd need to install packages to your home folder. However you can compile and install software to your local machine. Just unzip, then configure with |
||||
|
|
|
From my own experience there is no easy way to use existing DEB packages to install into another directory that isn't a chroot environment. The Debian/Ubuntu installation tools dpkg/aptitude/dselect all require root privileges to function properly. Now given the source DEB you can modify the Debian/rules file to have the package build and install into a different directory tree, but then you are not using the binary packages already available. As others have mentioned you can use debootstrap and easily build a chroot environment, which I have done in the past to have a 32-bit environment on a 64-bit host, but this requires installing a chroot with at least the base packages duplicated. If you have the space and this is a viable solution you can couple it with |
||||
|
|
|
I have trouble imagining how that would work with the official repositories from a distribution. How should it resolve dependencies? From the system or from your home directories? What if it finds different versions in both? The best I can think of would be a chroot'd environment like people do for 32-bit applications on 64-bit systems. It's more overhead as you would be calling debootstrap in the chroot, but with some symlinking, shell wrapper script fun, it might do what you want. |
||||
|
|
|
I'm still working on the problem, but debootstrap basically what you need, and should work with fakeroot. debootstrap is just a bunch of shell scripts, so I'm pulling it apart to see what makes it tick. The hard part will be in uninstalling the files once they are installed. |
||||
|
|
Unfortunately I haven't heard of any distro providing something like this (although I'm sure it would be super popular). You may be able to mimic the rpm based distro though... I haven't tried this, but you may be able to build a user based rpm database and then install rpm's into the user database. Try setting up a new user based distro with:
Then there are several options that may help:
|
||||
|
|