installing packages without sudo access

11

3

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?

whitman

Posted 2010-01-26T21:10:15.420

Reputation:

try asking on www.superuser.com or if a server question specifically www.serverfault.com – None – 2010-01-26T21:17:42.470

Answers

4

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.

Egon Willighagen

Posted 2010-01-26T21:10:15.420

Reputation: 457

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 – 2018-02-13T13:22:23.633

2

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.

Tobu

Posted 2010-01-26T21:10:15.420

Reputation: 2 584

0

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.

whitequark

Posted 2010-01-26T21:10:15.420

Reputation: 14 146

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 – 2010-01-26T22:16:29.957

Thanks, edited the post. Firefox info is still useful through. – whitequark – 2010-01-26T22:34:12.507

0

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.

Peter Eisentraut

Posted 2010-01-26T21:10:15.420

Reputation: 6 330

0

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

rogerdpack

Posted 2010-01-26T21:10:15.420

Reputation: 1 181

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 – 2010-07-24T15:24:22.087