Giter VIP home page Giter VIP logo

Comments (15)

msprotz avatar msprotz commented on June 29, 2024

hmm I'm confused can you give more information, i.e. the command you were running

from ocaml-installer.

nehz avatar nehz commented on June 29, 2024

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

from ocaml-installer.

msprotz avatar msprotz commented on June 29, 2024

but are you not in a cygwin shell?

from ocaml-installer.

nehz avatar nehz commented on June 29, 2024

yes in a cygwin shell sorry
32-bit is ok

from ocaml-installer.

msprotz avatar msprotz commented on June 29, 2024

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

from ocaml-installer.

nehz avatar nehz commented on June 29, 2024

Ops... I meant opam install ocamlfind

$ which tar
/usr/bin/tar

from ocaml-installer.

ignacio-gc avatar ignacio-gc commented on June 29, 2024

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

from ocaml-installer.

msprotz avatar msprotz commented on June 29, 2024

I don't think the combination of opam + msys2 is supported...

from ocaml-installer.

ignacio-gc avatar ignacio-gc commented on June 29, 2024

Yes, I read that. Now I try with cygwin following all the instructions and the same problem with "ocamlfind" occurs.

from ocaml-installer.

 avatar commented on June 29, 2024

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 !

from ocaml-installer.

msprotz avatar msprotz commented on June 29, 2024

I'm not sure what cmder is but you're expected to kick-start opam via a cygwin prompt, right?

from ocaml-installer.

 avatar commented on June 29, 2024

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

from ocaml-installer.

msprotz avatar msprotz commented on June 29, 2024

Cygwin is a hard requirement, and the opam as distributed is known to work only when launched from a cygwin terminal.

from ocaml-installer.

 avatar commented on June 29, 2024

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 :/

from ocaml-installer.

TrakJohnson avatar TrakJohnson commented on June 29, 2024

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 ?

from ocaml-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.