How can I compile/install additional software on a managed linux workstation?

Only system administrators with elevated privileges (a.k.a. sudo or root privileges) are allowed to use the commands apt, apt-get or dpkg to install pre-compiled .deb-packages on a managed linux client.

As a possible way around this restriction, most software can be built from its source code and installed without elevated privileges to a custom location. Details to install software from its source code are typically listed in accompanying files named README and INSTALL, the following describes a generic installation process:

Generic installation process

Variable

Meaning

PREFIX

Toplevel directory path where the software is going to be installed

CPPFLAGS

C preprocessor environment variable to add directories containing library headers in a custom location

LDFLAGS

Linker environment variable to add directories containing libraries installed in a custom location

Simplified example

The directory opt serves as the location for all custom-built software in the following examples.

Install a software where all dependencies are available

./configure --prefix=/home/$USER/opt
make
make install

Install software depending on previously built libraries

export CPPFLAGS=-I/home/$USER/opt/include
export LDFLAGS=-I/home/$USER/opt/lib
./configure --prefix=/home/$USER/opt 
make
make install


CategoryLXSW

FAQ/CompileInstallAdditionalSoftware (last edited 2020-10-20 12:18:40 by maegger)