dom96 / choosenim

Tool for easily installing and managing multiple versions of the Nim programming language.
BSD 3-Clause "New" or "Revised" License
680 stars 64 forks source link

"Access is denied" installing choosenim on Windows #206

Closed adamlwgriffiths closed 4 years ago

adamlwgriffiths commented 4 years ago

When I run the choosenim installer, I get an error "Access is denied". I've tried running the .bat file, and running the command "./choosenim/choosenim stable" manually.

The only thing I can think that could be different on my system, is my $HOME is on E, but $USERPROFILE is on E. I've moved my home directory off that drive and onto another drive. If you fully move the home directory on Windows, you break system updates, hence I did not.

I've tried running the installer from both C and E drives with no change.

~/Downloads/apps/development/nim/choosenim-0.6.0_windows_amd64$ ls
choosenim/  runme.bat
im/choosenim.exe stable
    Prompt: Can choosenim record and send anonymised telemetry data? [y/n]
        ... Anonymous aggregate user analytics allow us to prioritise
        ... fixes and features based on how, where and when people use Nim.
        ... For more details see: https://goo.gl/NzUEPf.
    Answer: n
Downloading C compiler (Mingw64)
[##################################################] 100.0% 0kb/s
 Extracting mingw64.7z
       Tip: 5 messages have been suppressed, use --verbose to show them.
     Error: Unable to extract. Error was 'Access is denied.
        ... '.
dom96 commented 4 years ago

Tried launching cmd.exe as an admin?

genotrance commented 4 years ago

This is an issue with extracting the nim-gdb.bash symlink on Windows. It works fine on Travis Windows but not on the VMs Microsoft provides for some reason.

https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

Are you using one of these? Not sure what's different.

I've fixed this in the latest nimarchive, we need a newer choosenim build to get the fix.

Edit: rather call it a workaround until we figure out why it fails in the first place - https://github.com/genotrance/nimarchive/commit/7a96eb4db594b237f6f0b102934cd0e3e2d9fa0d#diff-df2207508397aca950e4a88d20a2d53eR81

adamlwgriffiths commented 4 years ago

Ah yeah I'll try running cmd as admin.

I'm running Windows on the metal.

edit: running command as admin doesn't fix it.

edit: I'm having similar issues with conda. It looks like I've got some crazy permissions going on. I'm going to close this until I get that sorted.

adamlwgriffiths commented 4 years ago

I have a feeling this is because my user path had a space in it.