问题
I am trying to install one of the coq user contrib libraries (MathClasses). After some googling, I found what seems to be a central git repository at the Coq website, https://gforge.inria.fr/git/coq-contribs/.
Following the README file there, I tried to get the source code by:
git clone git+ssh://scm.gforge.inria.fr/git/coq-contribs/coq-contribs.git
But I get an error:
Cloning into 'coq-contribs'...
ssh: connect to host gforge.inria.fr port 22: Connection refused
fatal: Could not read from remote repository.
I tried this from both MinGW and Lubuntu 14.04, and got the same error.
My questions are:
How to fix the above error?
Is https://gforge.inria.fr/git/coq-contribs/ the right place to download user-contributed libraries? I tried
opam
on Lubuntu 14.04, but it seems to be linux only, and the stock version is lower (1.1.1) than recommended by what's suggested on the Coq website (1.2+).
回答1:
The URL git+ssh://...
is probably for developers who need to be able to check in code. You could use git clone https://gforge.inria.fr/git/coq-contribs/math-classes.git
instead, but it is less recently updated than the github repo.
Or, you can download it from the official page: http://www.lix.polytechnique.fr/coq/pylons/contribs/files/MathClasses/v8.4/MathClasses.interfaces.abstract_algebra.html
To compile, I did
git clone https://github.com/math-classes/math-classes.git
cd math-classes
./configure.sh
make -j
make install
Testing that it worked:
cd ..
coqtop
Require Import abstract_algebra.
回答2:
To install Coq contributions, you can now use the OPAM package manager. See for example the list of OPAM packages for Coq.
来源:https://stackoverflow.com/questions/30313458/how-to-install-coq-contribs-using-git