How to install software/libraries as a user?

You are here:
Estimated reading time: 2 min

The institute’s workstations and guest laptops do not give users direct access to the system’s software management system to install new software “globally” on those machines. But there are a few ways as a user to get new software or libraries added to the system.

ICG IT support

To top

The easiest way to get the software you require is through the ICG IT support. For workstations, simply drop them an email to ask for the specific software. If you are planning to use one of the guest laptops, make sure that you mention these kind of specific requirements in the comment field of the Laptop Request Form.

Install programs/C libraries (on Linux)

To top

Unfortunately, it is not possible to install packages like rpm’s automatically, not even in the own home directory, since permissions prevent users from gaining a lock on the management system. But in many cases, in particular for libraries, an alternative exists in form of compiling and installing from the source code itself. Sounds scary, but is actually often as easy as using the automatic way.

If you want to know how to compile and install a library and program from the source code, you usually find an INSTALL or README file within the source code folder that explains the required steps. In most cases the code is shipped either in a zipped tar archive or available from a repository (git,svn,…). So the first step is to download and unpack the archive file


wget <URL to tgz source archive>
tar xvfz <tgz source archive filename>

or clone the repository (here a git repository)

git clone <URL to git repository>

In most cases, open source project are working nowadays with customizable Makefiles or, even easier, configuration script that analyze the system and generate a fitting Makefile automatically (cf. GNU autotools). In the former case, you have to edit the Makefile yourself to e.g. set the installation path (i.e. to a folder you have write access to e.g. a folder in your home directory). In the latter case, you simply invoke the configure script and pass the installation path to it:

cd <path to source code>
./configure --prefix=<installation path>

Once this either manual or automatic configuration is finished, you can invoke the Makefile to build and install the program (the actual command may vary. Consult the INSTALL or README files for more details)

make && make install

Last, but not least, you have to tell Linux where to look for this new program / library files. The easiest way to do this, is to add the following lines to the .bashrc (or equivalent rc file for alternative shells, but then also with equivalent syntax) in your home directory:

export PATH=<installation path>/bin:$PATH
export LD_LIBRARY_PATH=<installation path>/lib64:<installation path>/lib:$LD_LIBRARY_PATH
export $INCLUDE_PATH=<installation path>/include:$INCLUDE_PATH

Install python packages

To top

Again, normal user face the obstacle here, that they won’t have permissions to install any package globally. In most situations the best solution is to rely on the so-called “user site” location (see the PEP for details) by running:

pip install --user <package_name>

which will install the package into the respective python user space (usually within the home directory).

Was this article helpful?
Dislike 0
Views: 622