1

I'm trying to install things to start doing stuff using OCaml, but somehow on Windows 11 it can't find "git" that is apparently installed

I've tried a lot of stuff: installing stuff from OCaml documentation, installing things from DKML guide, adding git folder to PATH, copying git to DKLM folder, doing things in vscode terminal, cmd, powershell, bash. "where git" and "git --version" prove that git can be found

Edit: here is cmd.exe output about PATH's variable content: https://pastebin.com/6qbB2LGQ

And I'm still getting this, no matter what I want to do with ocaml software

C:\Windows\System32>opam init -y
opam: [WARNING] Detected that the "opam root" package cache is missing the DkML repository. Creating it now. ETA: 10 minutes.
Using feature flag: DKML_FEATURE_FLAG_POST_OPAM_2_2_BETA2
[2025-06-03T14:34:06+00:00] /c/Users/Edemit/AppData/Local/Temp/dkml-initsystem-wd-104fed/scripts/vendor/drd/src/unix/private/platform-opam-exec.sh -p windows_x86_64 -d  -r C:\Users\Edemit\AppData\Local\opam -o C:\Users\Edemit\AppData\Local\Programs\DKMLNA~1\ -v C:\Users\Edemit\AppData\Local\Programs\DKMLNA~1\ repository add diskuv-2.1.3 git+https://github.com/diskuv/diskuv-opam-repository.git#2.1.3 --yes --dont-select --rank=1
[ERROR] Could not update repository "diskuv-2.1.3": "git": command not found.
[ERROR] Initial repository fetch failed
opam: [WARNING] Deleting the temporary directory C:\Users\Edemit\AppData\Local\Temp\dkml-initsystem-wd-104fed failed: delete directory C:\Users\Edemit\AppData\Local\Temp\dkml-initsystem-wd-104fed: C:\Users\Edemit\AppData\Local\Temp\dkml-initsystem-wd-104fed\scripts\cache-vsstudio.bat: Invalid folder name.

FATAL: <builtin>\vendor\drd\src\unix\private\init-opam-root.sh exited with error code 40

Idk what I should do, stick to DKML or try to uninstall it? Just don't want to break anything on my PC. I've found nothing on the web, so you're my only hope, guys. Thanks

5
  • I may be demonstrating ignorance here, but any reason to do this vs. using opam to install OCaml and the various libraries/tools? Commented Jun 3 at 17:18
  • @Chris That's what I'm doing, I've installed OCaml.opam and I'm trying to execute opam init -y and other stuff to start using it, but it just can't find my git Commented Jun 3 at 17:22
  • Do you have the same problem if you install opam using the instructions here rather than the DkML instructions? Commented Jun 3 at 17:32
  • Idk why, but this time it works (?), thanks. But now it says that I don't have any Visual Studio installed on my pc. but it is. Do you know how can I show it a way? pastebin.com/7TQ4ExBz I've deleted the 14th version of VS because at some point it said that I should have a new 17th version that I've already had, but I still reinstalled it just in case Commented Jun 3 at 18:53
  • Simply uninstall git, then download latest version and reinstall git. Afterwards reboot your system. Commented Jun 3 at 21:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.