Error when executing stack on Windows

已查看 130 次
跳至第一个未读帖子

Louis-Simon Houde

未读,
2022年9月17日 12:56:022022/9/17
收件人 haskell-stack
Hello,

I juste downloaded stack on my Windows PC. I get the following error when trying to compile a simple Haskell program.

Extracted 15 filesERROR: Cannot create symbolic link : A required privilege is not held by the client
Problem while decompressing msys2-20220503.tar

BTW, anyone programming Haskell on Windows ? Should I switch to Linux ?

Thanks

Mike Pilgrem

未读,
2022年9月18日 15:24:312022/9/18
收件人 haskell-stack
I use Stack on Windows 11, but I have not encountered that problem myself and cannot recreate it with Stack 2.7.5 or 2.9.1 (pre-release). Please can you raise an issue on Stack's GitHub repository (https://github.com/commercialhaskell/stack) and include your version of Windows and the full output of the Stack command. Perhaps we can work out how your Windows system and mine differ, with a view to finding a solution for you.

Louis-Simon Houde

未读,
2022年9月18日 18:37:372022/9/18
收件人 Mike Pilgrem、haskell-stack
Thanks for the reply.

I noticed that files in C:\Users\houde\AppData\Local\Programs\stack always revert back to read-only even if I change permissions or uncheck "read-only" . It does not seem to be due to "Controlled Folder Access" feature that comes with Windows Defender because I have another antivirus. Should I still open an issue on github because it does not seem related to stack. All my folders under AppData are read-only. Is there a way to tell stack to install ghc and other binaries to another folder ?

I'm on Windows 10 and installed stack with ghcup.

Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "haskell-stack" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/haskell-stack/1oVxBPTSW4M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to haskell-stac...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/6f18c8c2-4014-4b36-86eb-c10e51075061n%40googlegroups.com.

Mike Pilgrem

未读,
2022年9月19日 12:57:522022/9/19
收件人 haskell-stack
The Stack option `local-programs-path` can be set in Stack's project-level YAML configuration file (`stack.yaml`) or its global-level YAML configuration file (`config.yaml`) - see https://docs.haskellstack.org/en/stable/yaml_configuration/#local-programs-path.

I think this is unlikely to be the solution, but if you delete `7z.dll` and `7z.exe` in Stack's programs directory (its location reported by `stack path --programs`), Stack will fetch the most up-to-date version of 7-Zip (that is a recent development).

Louis-Simon Houde

未读,
2022年9月19日 19:19:452022/9/19
收件人 Mike Pilgrem、haskell-stack
Thank you,

The option worked like a charm but I still got the same error. I will open an issue. I'm starting to think maybe the install program checks if it can create a symlink and it detects it cannot because of the read-only flag even if it could create it. I even tried it as admin. Thanks for your help, I will open a ticket with the full output.

Louis-Simon Houde

未读,
2022年9月19日 19:26:322022/9/19
收件人 Mike Pilgrem、haskell-stack
Okay, it finally worked as admin with the local path option !
回复全部
回复作者
转发
0 个新帖子