2

I am trying to follow this guide to install OCaml on windows. All I've done is download the latest installer from here, but when I try to run it I get:

FATAL [ebe9e0f2]. rename C:\Users\<myusername>\AppData\Local\Programs\DiskuvOCaml\bin\bos-08440b.tmp to C:\Users\<myusername>\AppData\Local\Programs\DiskuvOCaml\bin\opam-real.exe: Permission denied

I tried running it as administrator but I get the same error. I can't find information on that error code anywhere, even in the troubleshooting guide.. any ideas?

glennsl
  • 28,186
  • 12
  • 57
  • 75
Vanessa
  • 145
  • 1
  • 5
  • Which version of Windows are you running? – Chris Jan 11 '23 at 15:31
  • 1
    You may find WSL a better way of running OCaml on Windows. – Chris Jan 11 '23 at 15:49
  • @Chris windows 11, and this guide https://ocaml.org/docs/ocaml-on-windows says I can only use WSL2 to run it and not develop? – Vanessa Jan 12 '23 at 04:47
  • @Vanessa it's not quite true, they say they *recommend it as an easy solution*, not that WSL2 cannot be used to develop too, although it might be a little bit convoluted. I know people who have done it, so I know it is possible, but I have no idea how hard it is to achieve (the people I know where not extremely tech-savvy, so I don't think it's *that* hard). Besides this, I would suggest using Emacs to dev OCaml with WSL, as I know it's what they did, so it probably works quite easily (and Emacs has very good support for OCaml). – jthulhu Jan 12 '23 at 21:08
  • ahh I see, thank you. WSL2 was the easiest to set up :) – Vanessa Feb 08 '23 at 13:34

1 Answers1

1

This happens when restarting the setup after a reboot. I've deleted the whole diskuv directory and restarted.

If you check the directory, the target already exists, so the rename fails -- the script should check for existence or for the file move.

I say delete the whole directory, because if you just delete this one target, it will just move on to the other executables that will have the same error.

This is as of March, 2023 on Windows 10.

LanceH
  • 1,726
  • 13
  • 20
  • yes I thought that too, but unfortunately deleting did not work for me. I decided to stick to WSL. – Vanessa Mar 27 '23 at 00:32
  • FWIW, once I removed cygwin and mingw from my PATH and deleted the `%LocalAppData%\Programs\DiskuvOCaml` directory, I was able to successfully rerun the installer (`setup-diskuv-ocaml-windows_x86_64-1.2.0.exe`) from a PowerShell terminal – Doug Cuthbertson Aug 18 '23 at 17:27