Skip to content

Cannot install HLS on MacOS (M1)

Hi, I was having troubles installing HLS via ghcup. I have deleted the whole .gchup directory and reinstalled it, here is what I get:

➜  ~ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

Welcome to Haskell!

This script will download and install the following binaries:
  * ghcup - The Haskell toolchain installer
  * ghc   - The Glasgow Haskell Compiler
  * 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

ghcup installs only into the following directory,
which can be removed anytime:
  ~/.ghcup

Press ENTER to proceed or ctrl-c to abort.
Note that this script can be re-run at any given time.


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 59.8M  100 59.8M    0     0  4799k      0  0:00:12  0:00:12 --:--:-- 2697k
[ Info  ] Upgrading GHCup...
[ Warn  ] No GHCup update available

System requirements 
  Note: On OS X, in the course of running ghcup you will be given a dialog box to install the command line tools. Accept and the requirements will be installed for you. You will then need to run the command again.

Press ENTER to proceed or ctrl-c to abort.
Installation may take a while.


[ Info  ] downloading: https://downloads.haskell.org/~ghc/8.10.5/ghc-8.10.5-aarch64-apple-darwin.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  243M  100  243M    0     0  5491k      0  0:00:45  0:00:45 --:--:-- 5974k
[ Info  ] verifying digest of: ghc-8.10.5-aarch64-apple-darwin.tar.xz
[ Info  ] Unpacking: ghc-8.10.5-aarch64-apple-darwin.tar.xz to /private/var/folders/z1/_xr4v24s5x79ngycy10hskgw0000gq/T/ghcup-6bfc9e576175c8a1
[ Info  ] Installing GHC (this may take a while)
[ Info  ] GHC installation successful
[ Warn  ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Info  ] GHC 8.10.5 successfully set as default version
[ Warn  ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Info  ] downloading: https://downloads.haskell.org/~ghcup/unofficial-bindists/cabal/3.4.0.0/cabal-install-3.4.0.0-aarch64-darwin-big-sur.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6849k  100 6849k    0     0  5088k      0  0:00:01  0:00:01 --:--:-- 5088k
[ Info  ] verifying digest of: cabal-install-3.4.0.0-aarch64-darwin-big-sur.tar.xz
[ Info  ] Unpacking: cabal-install-3.4.0.0-aarch64-darwin-big-sur.tar.xz to /private/var/folders/z1/_xr4v24s5x79ngycy10hskgw0000gq/T/ghcup-1337009648916d10
[ Info  ] Installing cabal
[ Info  ] Cabal installation successful
Downloading the latest package list from hackage.haskell.org
Updated package list of hackage.haskell.org to the index-state 2021-07-07T08:16:20Z
To revert to previous state run:
    cabal v2-update 'hackage.haskell.org,2021-07-06T12:20:49Z'
Do you want to install haskell-language-server (HLS) now?
HLS is a language-server that provides IDE-like functionality
and can integrate with different editors, such as Vim, Emacs, VS Code, Atom, ...
Also see https://github.com/haskell/haskell-language-server/blob/master/README.md

[Y] Yes  [N] No  [?] Help (default is "N").

Y
[ Warn  ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Error ] Unable to find a download for the requested version/distro.
[ Error ] Also check the logs in ~/.ghcup/logs
"_eghcup --cache install hls" failed!

When I later try to install HLS, I still get the "Unable to find a download" error message. Also via ghcup tui.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information