Skip to content

Platform not detected correctly on Red Hat Enterprise Linux 7

Today I tried installing a new version of GHC using ghcup on RHEL:

$ ghcup install 8.10.1
[ Warn  ] New GHC version available: 8.10.1. To upgrade, run 'ghcup install 8.10.1'
[ Info  ] downloading: https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-x86_64-fedora27-linux.tar.xz

This fails with

error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

because RHEL 7 has an older version of libtinfo.so than Fedora 27.

This lead me to check https://downloads.haskell.org/~ghc/8.10.1, where I could see that there is a version of GHC for centos7, which is the version that works on RHEL 7, because CentOS is a copy of RHEL.

Hence, I was able to make the install work by running:

$ ghcup install -p x86_64-centos7-linux 8.10.1

Now, my proposal is that when running on RHEL the platform should be detected as CentOS, not Fedora. I would submit a pull request to get this fixed if I knew where to start, so hopefully someone can point me in the right direction.

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