Originaly published 2010-07-06 14:29:11
My department is planning to install Ubuntu on all our lab machines, and probably take away sudo access from everyone who doesn't truly need it (i.e. anyone who isn't a sysadmin). I'm looking forward to having Ubuntu, but it's less useful if I can't install the software I want with apt-get. Thus, I started wondering whether it's possible to install Debian packages in a non-standard location, without being root.
dpkg has a
--root option that lets you change the installation prefix, but it still won't let you install anything without being root.
apt-get will fetch packages, but, again, only as root. So I figured I'd write a script to do it all.
The script is here. It takes as arguments either the name of a package (like you'd pass to
apt-get install) or the filename of a .deb, and the prefix to which you'd like to install it. It fetches dependencies (and the package itself if necessary), then unpacks the debs and installs them. I'm planning to use it in combination with stow to install packages to