user2423780
user2423780

Reputation: 73

how to install coq - possible opam issue

I've tried to install coq using the instructions at https://coq.inria.fr/opam/www/using.html (modified as I've been told to update version number)

Here is what happens:

jeremy@cecs-042179:/mnt/local/coq$ export OPAMROOT=~/opam-coq.8.6 # insta directory
jeremy@cecs-042179:/mnt/local/coq$ opam init -n --comp=4.02.3 -j 2 # 2 is the number of CPU cores
OPAM has already been initialized.# opam-version    1.2.2
# os              linux
File /home/users/jeremy/opam-coq.8.6/compilers/4.01.0/4.01.0/4.01.0.comp does not existjeremy@cecs-042179:/mnt/local/coq$ 
jeremy@cecs-042179:/mnt/local/coq$ opam repo add coq-released http://coq.inria.fr/opam/released
# opam-version    1.2.2
# os              linux
File /home/users/jeremy/opam-coq.8.6/compilers/4.01.0/4.01.0/4.01.0.comp does not exist
jeremy@cecs-042179:/mnt/local/coq$ opam install coq.8.6 && opam pin add coq 8.6
[ERROR] No package named coq found.

Can anyone help me with what it all means and how do I actually install coq.

The above is on Linux, Ubuntu 16.04.3 LTS, opam --version is 1.2.2

It seems that since I did the above the instructions on https://coq.inria.fr/opam/www/using.html have changes, so I've tried the new version, here is what happens

jeremy@cecs-042179:/mnt/local/coq$  export OPAMROOT=~/opam-coq.8.7 # installation directory
jeremy@cecs-042179:/mnt/local/coq$ opam init -n --comp=4.02.3 -j 2 # 2 is the number of CPU cores
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!

=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Processing: [default: http]

and at this point it hangs

Is this an issue with opam or with the coq instructions?

Any hints on how I proceed from here?

Upvotes: 4

Views: 344

Answers (1)

Charlie Parker
Charlie Parker

Reputation: 5199

This consistently works for me:

opam switch create pycoq-ejgallego 4.12.0
eval $(opam env --switch=pycoq-ejgallego --set-switch)
opam pin add -y coq 8.16.0
# Install the packages that can be installed directly through opam
opam repo add coq-released https://coq.inria.fr/opam/released
opam repo add coq-extra-dev https://coq.inria.fr/opam/extra-dev

Upvotes: 0

Related Questions