# Installation help; GHCup install fails on intel macOS

**URL:** <https://discourse.haskell.org/t/installation-help-ghcup-install-fails-on-intel-macos/6075>\
**Category:** Learn\
**Created:** [March 31, 2023, 8:02am UTC](https://discourse.haskell.org/t/installation-help-ghcup-install-fails-on-intel-macos/6075 "2023-03-31T08:02:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![janolofi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/janolofi/32/3074_2.png) [@janolofi](https://discourse.haskell.org/u/janolofi)\
**Post date:** [March 31, 2023, 8:02am UTC](https://discourse.haskell.org/t/installation-help-ghcup-install-fails-on-intel-macos/6075/1 "2023-03-31T08:02:55Z")

</div>

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**

````haskell
[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. 🙏🏻

---

<div class="post-metadata">

**Author:** ![robx](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/robx/32/1900_2.png) [@robx](https://discourse.haskell.org/u/robx)\
**Post date:** [March 31, 2023, 9:20am UTC](https://discourse.haskell.org/t/installation-help-ghcup-install-fails-on-intel-macos/6075/2 "2023-03-31T09:20:33Z")

</div>

```haskell
[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…

---

<div class="post-metadata">

**Author:** ![janolofi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/janolofi/32/3074_2.png) [@janolofi](https://discourse.haskell.org/u/janolofi)\
**Post date:** [March 31, 2023, 10:46am UTC](https://discourse.haskell.org/t/installation-help-ghcup-install-fails-on-intel-macos/6075/3 "2023-03-31T10:46:39Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![janolofi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/janolofi/32/3074_2.png) [@janolofi](https://discourse.haskell.org/u/janolofi)\
**Post date:** [March 31, 2023, 3:39pm UTC](https://discourse.haskell.org/t/installation-help-ghcup-install-fails-on-intel-macos/6075/4 "2023-03-31T15:39:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [April 2, 2023, 5:11am UTC](https://discourse.haskell.org/t/installation-help-ghcup-install-fails-on-intel-macos/6075/5 "2023-04-02T05:11:02Z")

</div>

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.
