You can install CoqIDE either as a package or by compiling it form sources.

Installation from packages

To install Coq and CoqIDE, open a shell and run the following command:

sudo apt-get install coq coqide

To check that the installation is successful, run the command "coqc -v".

Then, you should configure CoqIDE bindings. This step is optional but strongly recommended, as the default bindings very often conflict with the bindings of the window manager. To that end, all you need to do is to copy a new binding file, as described on the page:

To check that CoqIDE is correctly installed and configured, run the command:

coqide &

Then, type Check True. and use the menu "Navigation", "Forward" to get Coq to check the definition.

Remark: the installation of Proof General should be described here.

Installation from sources


In a nutshell:

sudo apt-get install ocaml ocaml-native-compilers camlp5 liblablgtk2-ocaml-dev liblablgtksourceview2-ocaml-dev libgtk2.0-dev

Packages required for building Coq:

Packages required only for building CoqIDE:

Packages required only for obtaining Coq sources from the svn repository:

Packages required only for generating documentation: (you likely don't need it)

Downloading the sources

By default, you should get the archive version. If you are an advanced users, you may consider using an svn version.

Archive version (default):

  1. Download the Coq sources for the version that you want

  2. deflate the archive, e.g. running "tar -xvzf coq-8.4pl0.tar.gz"

Svn version: to get it, run:

svn checkout svn:// coq-v8.4

Warning: the svn version might contain some bug-fixes so it can be slightly different from the archive version.

Trunk version: if you want to try a feature from the trunk version, then run:

svn checkout svn:// coq-trunk

Warning: the trunk is not stable, it might not even compile.

Choice of the target folder

First, enter the folder that contains the sources. Then, choose among:

Global installation (default): if you want to install only one version of Coq installed and if you have root priviledges, then do:

./configure -prefix /usr/local

Local installation: if you only want to go for a local installation of Coq (i.e., leaving the binaries in the ./bin folder), then run:

./configure -local

After running the configure command, you should be able to read:

You have GNU Make 3.81. Good!
You have Objective-Caml 3.11.2. Good!
You have native-code compilation. Good!

Moreover, if you plan to install CoqIDE, you should be able to read:

LablGtk2 found, native threads: native CoqIde will be available.

If LablGtk2 is not found, you may try to add the option -lablgtkdir /usr/lib/ocaml/lablgtk2/ to specify the directory.

It is useless to continue if you don't succeed at this stage.

Remark: the packaged version of v8.4pl0 has a known problem is localizing LablGtk2; a simple work around is to use the svn sources of v8.4.

Compilation of Coq and CoqIDE

To compile, run:


If everything works fine, the standard library should compile and then coqide should compile, without errors.

Then, if you used "-prefix /usr/local", run

sudo make install

To test the success of the installation, run "coqc -v" and "coqide &". If you plan on using CoqIDE, then it is very important that you fix the key bindings for CoqIDE.

Otherwise, if you went for a local installation with the option "-local", simply test the binaries using the commands "bin/coqc -v" and "bin/coqide &".

Cocorico: Installation of Coq on Linux (last edited 01-08-2016 22:21:55 by 140)