You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; try { Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true } catch { Write-Error $_ }
Welcome to Haskell!
This script can download and install the following programs:
* ghcup - The Haskell toolchain installer
* ghc - The Glasgow Haskell Compiler
* msys2 - A linux-style toolchain environment required for many operations
* cabal - The Cabal build tool for managing Haskell software
* stack - (optional) A cross-platform program for developing Haskell projects
* hls - (optional) A language server for developers to integrate with their editor/IDE
Please note that ANTIVIRUS may interfere with the installation. If you experience problems, consider
disabling it temporarily.
Where to install to (this should be a short Path, preferably a Drive like 'C:\')?
If you accept this path, binaries will be installed into 'C:\Program Files\ghcup\bin' and msys2 into 'C:\Program Files\ghcup\msys64'.
Press enter to accept the default [C:\Program Files\]:
Setting env variable GHCUP_INSTALL_BASE_PREFIX to 'C:\Program Files\'
Preparing for GHCup installation...
Specify Cabal directory (this is where haskell packages end up)
Press enter to accept the default [C:\Program Files\\cabal]:
Install HLS
Do you want to install the haskell-language-server (HLS) for development purposes as well?
[Y] Yes [N] No [A] Abort [?] Help (default is "N"): y
Install stack
Do you want to install stack as well?
[Y] Yes [N] No [A] Abort [?] Help (default is "N"): y
Create Desktop shortcuts
Do you want to create convenience desktop shortcuts (e.g. for uninstallation and msys2 shell)?
[Y] Yes [N] No [A] Abort [?] Help (default is "Y"): y
First checking for Msys2...
Install MSys2
Do you want GHCup to install a default MSys2 toolchain (recommended)?
[Y] Yes [N] No [?] Help (default is "Y"): y
...Msys2 doesn't exist, installing into C:\Program Files\\ghcup\msys64
Starting installation in 5 seconds, this may take a while...
Downloading Msys2 archive 20221216...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 57.0M 100 57.0M 0 0 7058k 0 0:00:08 0:00:08 --:--:-- 7295k
Extracting Msys2 archive...
System ERROR:
当文件已存在时,无法创建该文件。
Processing MSYS2 bash for first time use...
Write-Error: The term 'C:\Program Files\\ghcup\msys64\usr\bin\bash' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
The first error message in Chinese under "System ERROR",
当文件已存在时,无法创建该文件。
means
Cannot create the file when this file has already existed.
The text was updated successfully, but these errors were encountered:
No...because the GHCup download page says "run the following in a PowerShell session (as a non-admin user)", so I just ran the installation command as a non-admin user in powershell.
Thanks, I've installed ghcup successfully by installing as an admin user. But I think maybe the error message could be improved, because it does not say anything about the permission and thus makes it difficult to find the cause.
Output:
The first error message in Chinese under "System ERROR",
means
The text was updated successfully, but these errors were encountered: