1

I would like to install a bunch of packages (glogg, libprotobuf7, libleveldb1, libsnappy1, libhdf5-7) on an Ubuntu system on which I do not have root privileges. (I understand that this can be achieved by forcing the downloading and installation to take place on my home directory for example).

I would like to do this as fast as possible, e.g using apt (rather than manually searching the web for a link address to the package, then wget-ing it, then opening the tarball, then reading the INSTALL file to install correctly etc).

Is there a way to do this?

How can I install a package without root access? has a 1st answer that assumes that we have the .deb file already downloaded. This is not my case (and if you know of a way to get it quickly without scouring the web, I'd love to know).

2 Answers2

4

As mentioned in one of the comments, use apt-get just to download, then dpkg -i to install.

mkdir $HOME/.local
apt-get download <package_name>
dpkg -i --force-not-root --root=$HOME/.local <package_name.deb>

Note: what's nice is that apt-get automatically picks the package that fits your Ubuntu distribution and your architecture.

3

I guess the following would work to install the package to a directory: ~/local/

Download the package as package.deb using :

apt-get download <package_name>

Then run

dpkg --install package.deb --instdir=~/local
M.Tarun
  • 5,121