Differences between revisions 5 and 6
Revision 5 as of 2020-09-08 13:09:25
Size: 2299
Editor: stroth
Comment:
Revision 6 as of 2020-10-20 12:18:40
Size: 2300
Editor: maegger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
As a possible way around his 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: 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:

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

  • Download a source code archive, unpack it and enter the source code directory
  • Execute the command  ./configure --prefix=/home/$USER/package 

  • The configure script checks for dependencies necessary to build the software and creates the so-called Makefile. If it fails due to missing dependencies, install those first and set the necessary environment variables to make them available (see table below)

  • configure --help lists options and environment variables possible to pass to the script

  • Execute the command make to build the software

  • Execute the commande make install to install it

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)