When I try to cabal install haskeline, I get
Preprocessing library haskeline-0.7.1.3...
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
linking
dist/dist-sandbox-7d9f4d88/build/System/Console/Haskeline/Directory_hsc_make.o
failed (exit code 1)
Apparently, libncurses and libtinfo used to be a single package, libncurses. Haskeline should fall back to -lncurses if libtinfo is missing but libncurses is present.
Work-around:
After much debugging, the internet suggested symlinking libtinfo.so* to libncurses.so*. Because I have no root on the machine I'm using, I had to do this in a local folder, ~/.local64/lib, and then add ~/.local64/lib to LD_LIBRARY_PATH and LIBRARY_PATH (alternatively, pass cabal install the options --gcc-options="-L$(readlink -f ~/.local64/lib) -Wl,-L$(readlink -f ~/.local64/lib)" --ghc-options="-L$(readlink -f ~/.local64/lib)").