elm-repl
elm-repl copied to clipboard
REPL won't open with 6.0-3 of ncurses
I'm running an Arch based distro that has version 6.0-3 of ncurses installed. When I attempt to open the REPL, I get the following:
/home/wilhelmson/Elm-Platform/0.15.1/.cabal-sandbox/bin/elm-repl: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
I know this issue is a year old, but in case anyone runs into it:
- elm-repl seems to link to libtinfo now. You need to install the
libtinfopackage from AUR. - And for the same reason it was not working before (Arch is on version 6 of ncurses, not version 5) you need to link
/usr/lib/libtinfo.so.6to/usr/lib/libtinfo.so.5.
The joys of pre-built binaries. I imagine that other distros will be running into this problem before long...
I hit this today (on arch). This workaround isn't great. Symlinking a library between versions is begging for segfaults.
Agreed. I can't think what you could do about it, though. Upgrading the library will break other (arguably more popular) distros. In the end, I just built elm myself and decided not to use the NPM version.
What you could do about it:
- Ensure that libtinfo is statically linked during elm-repl's build. This will be reliable, and should be fairly easy to implement.
- Figure out what npm supports with respect to shipping different binaries for different distros. Surely they don't expect that a single binary will work for all linux? This depends entirely on whether the nodejs community supports differentiating linuxen.
Arch users can install ncurses5-compat-libs from the aur. This package creates /usr/lib/libtinfo.so.5 and solved the error on my machine.