Skip to content

Cannot run or binary-install ghc-9.2.6 on macOS-12 (Monterey)

Switching from macOS Mojave (10.14) to Monterey (12) rendered my GHCs < 9.4 unusable (not 9.4 nor 9.6). I am getting e.g.

“ghc-9.0.2” cannot be opened because the developer cannot be verified.

If I register an exception in System Preferences for this, I get to the next step:

“libHShaskeline-0.8.2-ghc9.0.2.dylib” cannot be opened because the developer cannot be verified.

Manually adding an exception for each single library cannot be the way...

I tried to reinstall e.g. GHC 9.2.6 but then the installation procedure fails with the analogous errors.

I tried the workarounds described in #21506 (closed) but they do not help.

  1. Are there special installation instructions for the macOS bindists? ./configure && make install used to work for me (on Mojave).

    https://www.haskell.org/ghc/download_ghc_9_2_6.html#macosx_x86_64 merely states:

    This is a distribution for Mac OS X, 10.7 or later. The package requires the command line tools package of Xcode 4 or XCode 5 to be installed. You can find Xcode at http://developer.apple.com/.

  2. Is there a way to "fix" existing GHC installations, e.g. by "bulk-trusting" the files in their installation trees?

Summary

Write a brief description of the issue.

Steps to reproduce

wget https://downloads.haskell.org/~ghc/9.2.6/ghc-9.2.6-x86_64-apple-darwin.tar.xz
tar xf ghc-9.2.6-x86_64-apple-darwin.tar.xz
cd ghc-9.2.6-x86_64-apple-darwin
./configure
make install

Optional:

  • Operating System: macOS 12
  • System Architecture: x86_64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information