Error of installation

Hi everyone. I’m having trouble to install ocaml by following the tutorial on Get Up and Running With OCaml · OCaml Tutorials. I’m download setup-diskuv-ocaml-windows_x86_64-1.2.0.exe and at “Use the DKML installer” and here’s what happened:

dkml-package.bc: [e[34mINFOe[0m] Writing to registry for Add/Remove Programs
dkml-package.bc: [e[34mINFOe[0m] Running: C:\WINDOWS\system32\reg.exe import
                                   C:\Users\ELVE~1\AppData\Local\Temp\uninstall09077c.reg
L’opération a réussi.
dkml-package.bc: [e[34mINFOe[0m] Detecting whether administrator privileges are needed by running
                        C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg\network-ocamlcompiler\windows_x86_64\setup-machine.bat
                          -DkmlPath
                          C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg\network-ocamlcompiler\windows_x86_64\dkmldir
                          -TempParentPath
                          C:\Users\ELVE~1\AppData\Local\Temp\path_eval_8351cf
                          -SkipProgress -AllowRunAsAdmin
                          -SkipAutoInstallVsBuildTools
Rename-Item : Un objet n'existe pas à l'emplacement spécifié C:\Users\ELVE~1.
Au caractère C:\Users\Elève\AppData\Local\Temp\7z594A50A8\sg\network-ocamlcompiler\windows_x86_64\SingletonInstall\Depl
oyers\Deployers.psm1:429 : 5
+     Rename-Item "$absDeployStateJson.tmp" "$DeployStateJson" -Force
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument : (:) [Rename-Item], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.RenameItemCommand

dkml-package.bc: [WARNING] setup-machine.ps1 had non-zero exit code 1, so not asking for administrator privileges
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-staging-opam64
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-staging-ocamlrun
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-staging-unixutils
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-staging-desktop-compile
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-staging-desktop-full
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-staging-opam32
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-staging-withdkml
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-staging-dkmlconfdir
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-package.bc: [INFO] Running: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                   install-user-offline-opamshim
                                   --verbosity=info --color=always --prefix
                                   C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                   --staging-files
                                   C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg
dkml-install-user-runner.exe: [INFO] Running bytecode with: C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg\staging-ocamlrun\windows_x86_64\bin\ocamlrun
                                                              C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg\offline-opamshim\generic\install_user.bc
                                                              --verbosity=info
                                                              --color=always
                                                              --opam-exe
                                                              C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg\staging-opam64\windows_x86_64\bin\opam.exe
                                                              --with-dkml-exe
                                                              C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg\staging-withdkml\windows_x86_64\bin\with-dkml.exe
                                                              --target-dir
                                                              C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
FATAL [ebe9e0f2]. rename C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml\bin\bos-cad667.tmp to C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml\bin\opam-real.exe: Permission denied

dkml-package.bc: [ERROR] FATAL [5f927a8b].
                         A transient failure occurred.

                         Root cause: The command had exit code 20:
                                       C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\bin\dkml-install-user-runner.exe
                                         install-user-offline-opamshim --verbosity=info --color=always
                                         --prefix C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
                                         --staging-files
                                         C:\Users\ELVE~1\AppData\Local\Temp\7z594A50A8\sg

                         >>> A transient failure occurred. <<<



Press "y" and ENTER to exit the installer.

and when I try to continue the tutorial it definitly don’t work at all

I suspect you are running into troubles because your user path contains accented caracters but you will have to wait for a Windows user to chime in on what to do.

thanks for the comment

Maybe it is the accented character, but it could be something else. In the interest of time, just try the nuclear option …

First, run Windows PowerShell. Then:

  1. Inside PowerShell run the following command:

    taskkill /F /IM ocamllsp.exe ; taskkill /F /IM dune.exe ; taskkill /F /IM dune-real.exe; taskkill /F /IM opam.exe; taskkill /F /IM opam-real.exe ; taskkill /F /IM git.exe; taskkill /F /IM with-dkml.exe; taskkill /F /IM bash.exe
    
  2. Wait for a couple seconds

  3. Go back to step 1! You will do it five (5) more times.

Second, run File Explorer and delete the following directories if they exist:

  • C:\Users\Elève\AppData\Local\Programs\DiskuvOCaml
  • C:\Users\Elève\AppData\Local\Programs\DkMLNative
  • C:\Users\Elève\AppData\Local\Programs\DkMLByte

Third, download and run the newer “preview” 2.0.2 Native installer at
https://gitlab.com/diskuv-ocaml/distributions/dkml/-/releases/2.0.2/downloads/setup64nu.exe

Finally, if it still doesn’t work, schedule an appointment with me at contact me with a private message

Sorry but it didn’t work either… Can we organize a visio call to resolve the problem (I will soon be an informatic engineer student and I really want to master the basics of the language before classe starts !

PS: I’m french