From OpenWetWare

Jump to: navigation, search



Kappa is a powerful language for rule based modeling. Pre-compiled binaries are available for many operating systems (including Windows, Mac, and many versions of Linux), however it may be useful to compile Kappa from the source code. These instructions will guide you through updating and compiling OCaml and Kappa in a Debian-based virtual box.

Virtual Box

These instructions assume that you have already set up a Debian-based virtual box. The Virtual Box User Manual has more information on installing Virtual Box and creating a virtual machine.

Installing OPAM and labltk

The OCaml Package Manager (OPAM) is an easy way to keep OCaml updated and install the external library labltk which is needed to compile Kappa with the graphical interface.

To Install:

  • Open a terminal and run the following commands (in order):
sudo apt-get install opam
opam init (Press y when prompted)
opam switch 4.02.3
eval $(opam config env)
  • Check that OPAM was installed and configured correctly by running:
which ocaml
It should be similar to
  • Install the needed OCaml library labltk by running the following:
sudo apt-get install tk-dev
opam install labltk
  • Check that labltk was installed correctly by running:
which labltk
It should be similar to

Downloading and compiling Kappa

  • The recommended way to download Kappa is by cloning the git repository:
cd ~
mkdir Kappa
cd Kappa
git init (You may need to install git first by running sudo apt-get install git)
git clone
cd KaSim
  • (Optional) Compile the Kappa user manual:
sudo apt-get install graphviz gnuplot texlive
sudo -E env "PATH=$PATH" make doc
  • Compile Kappa:
sudo -E env "PATH=$PATH" make full
  • (Optional) Create symbolic links to the KaSim and KaSa bin files:
sudo ln -s ~/Kappa/KaSim/bin/KaSim /usr/local/bin/KaSim
sudo ln -s ~/Kappa/KaSim/bin/KaSa /usr/local/bin/KaSa


  • Taylor D. Scott 13:52, 18 December 2015 (EST):OPAM modifies the environment PATH variable which allows several versions of OCaml to be installed simultaneously. This modification is discarded when using sudo with the default settings, causing the make commands to fail. To fix this, use sudo -E env "PATH=$PATH" instead of sudo when running the make commands.
Personal tools