How to install program locally without sudo privileges?
You need to compile these from source. It should just be a matter of
apt-get source PACKAGE
./configure --prefix=$HOME/myapps
make
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.
Compile and install into
~/bin
(and edit your.bashrc
to set thePATH
to include it). libraries can similarly be compiled and installed into~/lib
(setLD_LIBRARY_PATH
to point to it), and development headers can be installed into e.g.~/includes
.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 thePATH
,LD_LIBRARY_PATH
, and othervariables
. 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 thesetuid
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.Most sysadmins would consider
mc
andmcedit
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.
You can use JuNest, which creates a small Linux container in user's directory, where you can install any packages.