I installed ocaml using the winget install Diskuv.Ocaml
command after countless tries with the offical installer not working. ocamlc
and ocamlopt
with utop
all work but dune
is not installed and when i try to run dkml
or opam
commands it throws the message below:
`dkml: [WARNING] Detected that a Visual Studio compatible with DkML has not been located. Locating it now. ETA: 1 minute.Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send. At C:\Users\yusuf\AppData\Local\Temp\dkml-initsystem-de-902afe\scripts\vendor\drd\src\windows\Machine\Machine.psm1:238 char:9 + Invoke-WebRequest -Uri https://github.com/microsoft/vssetup.p … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc eption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand Expand-Archive : The path ‘C:\Users\yusuf\AppData\Local\Temp\vssetup\VSSetup.zip’ either does not exist or is not a valid file system path. At C:\Users\yusuf\AppData\Local\Temp\dkml-initsystem-de-902afe\scripts\vendor\drd\src\windows\Machine\Machine.psm1:240 char:9 + Expand-Archive $TempPath\VSSetup.zip $VsSetupModules + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (C:\Users\yusuf.…tup\VSSetup.zip:String) [Expand-Archive], InvalidOpe rationException + FullyQualifiedErrorId : ArchiveCmdletPathNotFound,Expand-Archive Import-Module : The specified module ‘VSSetup’ was not loaded because no valid module file was found in any module directory. At C:\Users\yusuf\AppData\Local\Temp\dkml-initsystem-de-902afe\scripts\vendor\drd\src\windows\Machine\Machine.psm1:243 char:5 + Import-Module VSSetup + ~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (VSSetup:String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand Get-VSSetupInstance : The term ‘Get-VSSetupInstance’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\yusuf\AppData\Local\Temp\dkml-initsystem-de-902afe\scripts\vendor\drd\src\windows\Machine\Machine.psm1:392 char:21 + $allinstances = Get-VSSetupInstance + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-VSSetupInstance:String) , CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Select-VSSetupInstance : The term ‘Select-VSSetupInstance’ is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At C:\Users\yusuf\AppData\Local\Temp\dkml-initsystem-de-902afe\scripts\vendor\drd\src\windows\Machine\Machine.psm1:394
char:34
-
$instances = $allinstances | Select-VSSetupInstance `
-
~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : ObjectNotFound: (Select-VSSetupInstance:String) , CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
WARNING:
BEGIN Dump all incompatible Visual Studio(s)
WARNING: END Dump all incompatible Visual Studio(s) WARNING: There is no Visual Studio 2015 Update 3 or later with the following: a) MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.26 or v14.25 or v14.29) b) MSVC v142 - VS 2019 C++ x64/x86 build tools (Latest) c) Windows 10 SDK (10.0.18362 or 10.0.19041)
CHOOSE ONE OF THE SOLUTIONS BELOW
SOLUTION 1 (Recommended)
- Install winget (skip this step on Windows 11 or later since already installed):
Use the winget tool to install and manage applications | Microsoft Learn) - Run:
winget install Microsoft.VisualStudio.2019.BuildTools --override “–wait --passive --installPath C:\VS
–addProductLang En-us --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended”
…
dkml: FATAL: \cache-vsstudio.bat exited with error code 1`
I have followed the solutions, restarted my PC, uninstalled and reinstalled many times but nothing has changed.