opam does not install packages due to colon in path (64 bit)
With 64-bit package:
Error when tar during opam install:
# tar (child): Cannot connect to C: resolve failed
#
# gzip: stdin: unexpected end of file
# tar: Child returned status 128
# tar: Error is not recoverable: exiting now
hmm I'm confused can you give more information, i.e. the command you were running
any opam install *
so for example opam install opamfind
Basically tar is treating C:\... as a web address in the unpacking step of opam install
but are you not in a cygwin shell?
yes in a cygwin shell sorry 32-bit is ok
which tar command is that?
can you do which tar?
also:
protz@Joprotze-Z420:~/Code/mitls-fstar (master) $ opam install opamfind
[ERROR] No package named opamfind foun
Ops... I meant opam install ocamlfind
$ which tar
/usr/bin/tar
I'm trying to use opam in msys2, opam init works, opam install not:
### stderr ###
# tar (child): Cannot connect to C: resolve failed
#
# gzip: stdin: unexpected end of file
# tar: Child returned status 128
# tar: Error is not recoverable: exiting now
I don't think the combination of opam + msys2 is supported...
Yes, I read that. Now I try with cygwin following all the instructions and the same problem with "ocamlfind" occurs.
Hi !
I got the same problem. With "opam install ocp-indent"
#=== ERROR while compiling ocamlfind.1.5.6 ====================================#
# opam-version 1.3.0~dev2 (d4f7e01216dbb44af4e7cc6539a1b0afa9be9d2c)
# os win32
# command tar xfz C:\Users\Me\.opam\packages.dev\ocamlfind.1.5.6\findlib-1.5.6.tar.gz -C C:\Users\Me\AppData\Local\Temp\opam-8476-4bcc67
# path C:\Users\Me\.opam\packages.dev\ocamlfind.1.5.6
# exit-code 2
# env-file C:\Users\Me\.opam\log\log-8476-ccabea.env
# stdout-file C:\Users\Me\.opam\log\log-8476-ccabea.out
# stderr-file C:\Users\Me\.opam\log\log-8476-ccabea.err
### stderr ###
# tar (child): Cannot connect to C: resolve failed
#
# gzip: stdin: unexpected end of file
# tar: Child returned status 128
# tar: Error is not recoverable: exiting now
I'm on Windows 10, 64 bits and I work with Cmder on cmd.exe
Here's my tar :
λ which tar
/usr/bin/tar
and my version of Opam :
λ opam --version
1.3.0~dev2
Do someone have any idea of what to do ?
Thanks in advance !
I'm not sure what cmder is but you're expected to kick-start opam via a cygwin prompt, right?
Kick-start ? You mean "opam init" ? And I don't have Cygwin, because I use Cmder. And Cmder is a prompt which is more ergonomic and more aesthetic than the windows prompt. Plus I can open multiple prompts and have bash or powershell on it. It can also allow me the Linux basics commands like "ls" or so. Here's the website if you want : http://cmder.net/ Maybe my error come from this software
Cygwin is a hard requirement, and the opam as distributed is known to work only when launched from a cygwin terminal.
Are you sure ? Opam seems to work okay on Cmder. When I try to install my package, Opam work great until he reaches this command. So it seems that it's more the command that it has a problem :/
I'm experiencing the same issue as @TheHaricover, and after some research got to the following conclusion.
What seems to happen is that while installing the package, opam uses the tar command on an absolute path (i.e. tar -xfz C:\Emacs\.opam\packages.dev\result.1.2\1.2.tar.gz), and the presence of a colon : makes tar think that the file is online (because it thinks the absolute path is a hostname), and of course fails to get it.
# tar (child): Cannot connect to C: resolve failed
#
# gzip: stdin: unexpected end of file
# tar: Child returned status 128
# tar: Error is not recoverable: exiting now
As specified here, using the --force-local argument on the tar command fixes it; however I have yet to find a way how to make opam use this flag each time its unzipping.
So the final question is:
How can I pass arguments to the tar command that opam executes upon download ?