Skip to content

Installing environment modules without root permissions

boegel edited this page Nov 21, 2012 · 20 revisions

This short guide will explain how to install the environment modules software package without root permissions, together with Tcl on which it depends.

Tcl

  1. Go to http://www.tcl.tk and download the latest Tcl sources. At the time of writing, the latest available Tcl version was 8.5.13, which can be downloaded here. The remainder of these commands will assume Tcl v8.5.13 is being installed, you may need to adjust them accordingly.
  2. Unpack the Tcl source tarball:
tar xfvz tcl8.5.13-src.tar.gz
  1. Pick a location where you will install Tcl. It should be a directory you have write permissions on. My suggestion would be to use something like $HOME/.local/Tcl.
  2. Go to the unix subdirectory of the unpacked Tcl directory, and run the configure script using the --prefix option:
cd tcl8.5.13/unix
./configure --prefix=$HOME/.local/Tcl

If you're building Tcl and environment modules on Mac, you should run configure in the tcl8.5.13/macosx directory instead. 5. Next, build Tcl using the make command. If the system you are building on has multiple cores, running make in parallel will speed up the build. Just use the -j option, and pass it a degree of parallelism (just use the number of cores your system has available), e.g.:

make -j 4
  1. The final step consists of installing Tcl to the directory specified in step 4. To do this, simply run:
make install

All done! Now you are ready to build the environment modules package, which requires Tcl.

environment modules

  1. Download the latest source tarball for the environment modules tools from http://modules.sourceforge.net/. At the time of writing, the latest available version is 3.2.9c which can be downloaded here.
  2. Unpack the downloaded source tarball:
tar xfvz modules-3.2.9c.tar.gz 
  1. Configure the build, again use --prefix to specify where to install the environment modules tool in the end. If you needed to install Tcl by hand as outlined in the previous section, you'll also need to specify where it was installed using the --with-tcl option:
cd modules-3.2.9
./configure --prefix=$HOME/.local/environment-modules --with-tcl=$HOME/.local/Tcl/lib 
  1. Build with make, consider parallel build if your system is recent enough:
make -j 4
  1. Install:
make install
Clone this wiki locally