I'm looking at Modules 3.2.10 today.

It now has an install package in Kubuntu Muon, etc.

But I like to do this myself after having done that several times. I am today using Kubuntu 14.04, which already has tcl 8.6 and tk8.6 installed. I had previously done this in Kubuntu 13.something with tck/tk 8.4.

I've already done apt-get install build-essentials and kernel-headers to get the Linux Guest things for VirtualBox to isntall.

Also need to get these packages for Modules to configure and compile:

tcl-dev
tk-dev

tclx and tclx-dev (shows 8.4 today, while I have tcl and tk 8.6 installed)

In previous setups, I'd installed tcl/tk and -dev version 8.4, to get around a problem about "
errorLine". This time around, I've discovered another solution that lets me stay with tcl/tk 8.6 and tclx8.4 combination.

CPPFLAGS="-DUSE_INTERP_ERRORLINE" ./configure --prefix=/opt --with-tclx-ver=8.4 --with-tclx-lib=/usr/lib --with-tclx-inc=/usr/include/tclx8.4

Instead of what the installer wants to put at the top of my .bashrc file, I instead put this into ~/bin/modules.sh file, and have an alias named "mods" to run it:

case "$0" in
-sh|sh|*/sh) modules_shell=sh ;;
-ksh|ksh|*/ksh) modules_shell=ksh ;;
-zsh|zsh|*/zsh) modules_shell=zsh ;;
-bash|bash|*/bash) modules_shell=bash ;;
esac
export MODULES_VERSION=3.2.10
export MODULES_PATH=/opt/Modules
export MODULEPATH=$MODULES_PATH/versions:$MODULES_PATH/$MODULES_VERSION/modulefiles:$MODULES_PATH/modulefiles
module() { eval `/opt/Modules/$MODULES_VERSION/bin/modulecmd $modules_shell $*`; }
#module() { eval `/bin/modulecmd $modules_shell $*`; }