2

I'm following the first answer for installing OCaml on windows. I'm facing the following error when executing: opam install depext

# opam-version         1.3.0~dev (9fc27413c08030d909802dcdfb6e63b75d9dd762)
# os                   win32
# command              tar xfj /home/<user_name>/.opam/packages.dev/depext.1.0.5/opam-depext-full-1.0.5.tbz -C /cygdrive/c/Users/<user_name>/AppData/Local/Temp/opam-504-ccabea
# path                 C:\OCaml64\bin
# exit-code            2
# env-file             C:/OCaml64/home/<user_name>/.opam/log\log-504-42bb52.env
# stdout-file          C:/OCaml64/home/<user_name>/.opam/log\log-504-42bb52.out
# stderr-file          C:/OCaml64/home/<user_name>/.opam/log\log-504-42bb52.err
### stderr ###
# tar (child): /home/<user_name>/.opam/packages.dev/depext.1.0.5/opam-depext-full-1.0.5.tbz: Cannot open: No such file or directory
# tar (child): Error is not recoverable: exiting now
# /usr/bin/tar: Child returned status 2
# /usr/bin/tar: Error is not recoverable: exiting now

The file /home/<user_name>/.opam/packages.dev/depext.1.0.5/opam-depext-full-1.0.5.tbz exists, and viewing with procmon, I see that tar successes to find it, and the problem seems to be that the directory /cygdrive/c/Users/<user_name>/AppData/Local/Temp/opam-504-ccabea not exists, and tar tries to find it and fails, without trying to create it.

To confirm that, running

$ tar xfj /home/<user_name>/.opam/packages.dev/depext.1.0.5/opam-depext-full-1.0.5.tbz -C /cygdrive/c/Users/<user_name>/AppData/Local/Temp/opam-504-ccabea

gives the following error message:

tar: /cygdrive/c/Users/<user_name>/AppData/Local/Temp/opam-504-ccabea: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Running the command: tar xfj /home/<user_name>/.opam/packages.dev/depext.1.0.5/opam-depext-full-1.0.5.tbz successes, and the files are extracted as expected.

Does anyone has an idea how can I proceed with the installation?

macro_controller
  • 1,469
  • 1
  • 14
  • 32
  • opam and ocal are available as cygwin packages. It seems you are mixing Windows (not cygwin) with cygwin programs – matzeri May 10 '18 at 09:33
  • Try it again with `ocaml-env exec -- opam install depext`. Your environment (TMP? / TEMP?) looks suspicious. – rafix May 10 '18 at 10:28
  • Did you follow these instructions? http://fdopen.github.io/opam-repository-mingw/depext-cygwin/ – ivg May 10 '18 at 12:39
  • Also, here are some tricks http://fdopen.github.io/opam-repository-mingw/cygwin/ – ivg May 10 '18 at 12:40

0 Answers0