Raivo Laanemets. Software consultant.

Haskell Platform on Slackware 14.1


I needed to use ShellCheck and it requires Haskell/Cabal to be installed. After installing the Haskell Platform I received an error:

$ cabal install shellcheck

cabal: The program 'ghc' version >=6.4 is required but
the version of /usr/local/bin/ghc could not be determined.

Trying to execute /usr/local/bin/ghc:

$ /usr/local/bin/ghc

/usr/local/haskell/ghc-8.0.1-x86_64/lib/ghc-8.0.1/bin/ghc:
error while loading shared libraries: libtinfo.so.5: cannot
open shared object file: No such file or directory

Which is interesting, considering it's not even a dynamic executable:

$ ldd /usr/local/bin/ghc

not a dynamic executable

Anyway, the error can be fixed by symlinking ncurses library to the missing library (do as root):

ln -s /usr/lib64/libncurses.so.5 /usr/lib64/libtinfo.so.5

The command is for the 64-bit version. The 32-bit Slackware should have paths starting with /usr/lib. Cabal started working after this fix and allowed to install ShellCheck successfully.


Comments

Mr. Slack at 2016-07-15
Hey, thanks for this--it works like a champ on Slackware 14.2 and it saved me quite a bit of pain. Thanks again.

Ghost o' the Woods at 2017-01-20
I can't tell you how much I appreciate this. I could not figure out why I could see ghc installed but couldn't get it to work. Now it works. I'm also on 14.2.

Email is not displayed anywhere.
URLs (max 3) starting with http:// or https:// can be used. Use @Name to mention someone.