Installation help; GHCup install fails on intel macOS

Hi! I’m on macOS Monterey, intel core.

I have tried uninstalling (ghcup nuke, removed xcode’s command line tools, removed .ghc, .cabal and .ghcup folders) and reinstalled xcode-select and then:

Installing GHC / GHCup

[ Info  ] verifying digest of: ghc-9.2.5-x86_64-apple-darwin.tar.xz
[ Info  ] Unpacking: ghc-9.2.5-x86_64-apple-darwin.tar.xz to /Users/santamaraton/.ghcup/tmp/ghcup-4564b81e02834807
[ Info  ] Installing GHC (this may take a while)
[ ghc-configure ] dyld[13015]: Library not loaded: '/usr/local/opt/re...
[ ghc-configure ]   Referenced from: '/usr/local/Cellar/gawk/4.1.3_1/...
[ ghc-configure ]   Reason: tried: '/usr/local/opt/readline/lib/libre...
[ ghc-configure ] ./config.status: line 930: 13014 Done(141)         ...
[ ghc-configure ]      13015 Abort trap: 6           | $AWK -f "$ac_t...
[ ghc-configure ] config.status: error: could not create mk/config.mk
[ Error ] [GHCup-00841] Process "sh" with arguments ["./configure",
[ ...   ]                              "--prefix=/Users/santamaraton/.ghcup/ghc/9.2.5",
[ ...   ]                              "--disable-ld-override"] failed with exit code 1.
[ Error ] Also check the logs in /Users/santamaraton/.ghcup/logs
"ghcup --metadata-fetching-mode=Strict --cache install ghc recommended" failed!```

Request for help

Does anyone know what I could try to make things work again? Thank you. :pray:t2:

2 Likes
[ ghc-configure ] dyld[13015]: Library not loaded: '/usr/local/opt/re...
[ ghc-configure ]   Referenced from: '/usr/local/Cellar/gawk/4.1.3_1/...
[ ghc-configure ]   Reason: tried: '/usr/local/opt/readline/lib/libre...

/usr/local/Cellar is used by homebrew. My guess is that you have a somehow broken homebrew install, and GHC is picking up awk from there. (Whether for good reason or not I can’t say.) I think what I’d to to investigate further is to try running awk and gawk from the terminal, see if they’re the ones from homebrew, etc., and maybe try rerunning the ghcup installer in a terminal where /usr/local is removed from the path…

1 Like

Thanks so much!
I got further after a brew cleanup of gawk. Now (curl) install ends with the following:

 Installing cabal
[ Info  ] Cabal installation successful
sh: line 119: cabal: command not found
"cabal update --ignore-project" failed!
1 Like

and so, after brew installing ghc and cabal, it all works out!

2 Likes

That doesn’t sound right. You have now GHC and cabal from brew and from GHCup.

It sounds like something is weird about your shell configuration.

1 Like