Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assume I have ssh access to some Ubuntu server as user and I need some not system tools to be installed for convenience (mc, rtorrent, mcedit). I do not want to bother admins for these small programs.

Is there a way to install them (make them run) without using something like sudo apt-get install?

share|improve this question
Also see Where should a local executable be placed? for relevant discussion. – uther Jul 8 '12 at 14:56
possible duplicate of Installation on debian 5 32-bit without being a root – Gilles Jul 8 '12 at 23:07
See also Keeping track of programs – Gilles Aug 15 '14 at 0:44
See also Non-Root Package Managers – Gilles May 5 '15 at 23:30
up vote 14 down vote accepted
  1. Compile and install into ~/bin (and edit your .bashrc to set the PATH to include it). libraries can similarly be compiled and installed into ~/lib (set LD_LIBRARY_PATH to point to it), and development headers can be installed into e.g. ~/includes.

  2. Depending on the specific details of the programs you want to install and the libraries they depend upon, you can download the .deb files and use 'dpkg-deb -x' to extract them underneath your home directory. You will then have a lot of "fun" setting the PATH, LD_LIBRARY_PATH, and other variables. The more complex the program or app you're installing the more fun you'll be up for :)

    You will, of course, not be able to install setuid binaries this way - they'll install but (since you don't have permission to chown them to root or set the setuid bit on them) they'll just be normal binaries owned by you.

    Similarly, daemons and system services that expect to be running as a certain UID or have the ability to change uid, or expect files to be in /etc rather ~/etc and so on aren't likely to work well, if at all.

  3. Most sysadmins would consider mc and mcedit to be "mostly harmless", innocuous programs.

    Very few, however, would consider installing a torrent client to be harmless, especially if they have to pay for bandwidth or end up being legally liable. Most sysadmins would probably not be entirely happy for end-users to be installing such software without permission. They may say "sure, go ahead, knock yourself out" or they may not...but you should ask about anything that may cause problems for the owners/administrators of the machine.

share|improve this answer
I've heard that setting LD_LIBRARY_PATH is an evil hack. Does this apply here as well, or have I misunderstood? – Will Vousden Feb 10 at 13:59
All the issues with setting LD_LIBRARY_PATH apply. yes, it is, or can be, an evil hack. sometimes evil hacks are necessary to achieve particular goals...the crucial thing when breaking "rules" is to know them well enough to know what they're designed to save you from, and exactly why you need to break them in this particular case, and what the risks are or might be. – cas Feb 10 at 23:42

You need to compile these from source. It should just be a matter of

apt-get source PACKAGE
./configure --prefix=$HOME/myapps
make install

The binary would then be located in ~/myapps/bin. So, add export PATH="$HOME/myapps/bin:$PATH" to your .bashrc file and reload the .bashrc file with source ~/.bashrc. Of course, this assumes that gcc is installed on the system.

share|improve this answer
What about dependencies? Is there way to handle them automatically without running same code for each of them? – yura Jul 8 '12 at 4:34
@yura no you have to do it yourself. – Ulrich Dangel Jul 8 '12 at 8:00

You can use JuJu, which creates a small Linux container in user's directory, where you can install any packages.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.