Skip to content

error while loading shared libraries: libtinfo.so.5 #1012

Closed

Description

@zimurgh

So, today a system update of my Arch Linux box ended in tears as stack is now giving me this error whenever I try to build anything.

$ stack build
Running /home/oldmanmike/.stack/programs/x86_64-linux/ghc-7.10.2/bin/ghc --numeric-version exited with ExitFailure 127
/home/oldmanmike/.stack/programs/x86_64-linux/ghc-7.10.2/lib/ghc-7.10.2/bin/ghc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

But I have libtinfo.so.5...

$ ls -l /usr/lib | grep libtinfo
lrwxrwxrwx 1 root root       22 Sep 18 20:58 libtinfo.so -> /usr/lib/libtinfo.so.5

I've been able to reproduce this on two separate systems today, both running Arch Linux.

$ stack build --verbose
Version 0.1.3.1, Git revision 154fd25a9b231ca178ad3401aaec00c6b608e5db (1712 commits) X86_64
2015-09-19 01:40:58.129048: [debug] Checking for project config at: /home/oldmanmike/src/github.com/oldmanmike/catan/stack.yaml @(stack_H7Fzr4XhLQ9FcjplPK0nQq:Stack.Config src/Stack/Config.hs:466:9)
2015-09-19 01:40:58.129166: [debug] Loading project config file stack.yaml @(stack_H7Fzr4XhLQ9FcjplPK0nQq:Stack.Config src/Stack/Config.hs:489:13)
2015-09-19 01:40:58.129532: [debug] Trying to decode /home/oldmanmike/.stack/build-plan-cache/x86_64-linux/nightly-2015-09-17.cache @(stack_H7Fzr4XhLQ9FcjplPK0nQq:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:77:5)
2015-09-19 01:40:58.133896: [debug] Success decoding /home/oldmanmike/.stack/build-plan-cache/x86_64-linux/nightly-2015-09-17.cache @(stack_H7Fzr4XhLQ9FcjplPK0nQq:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:86:13)
2015-09-19 01:40:58.134341: [debug] Run process: ghc --info @(stack_H7Fzr4XhLQ9FcjplPK0nQq:System.Process.Read src/System/Process/Read.hs:260:3)
2015-09-19 01:40:58.159464: [debug] Run process: ghc --numeric-version @(stack_H7Fzr4XhLQ9FcjplPK0nQq:System.Process.Read src/System/Process/Read.hs:260:3)
Running /home/oldmanmike/.stack/programs/x86_64-linux/ghc-7.10.2/bin/ghc --numeric-version exited with ExitFailure 127
/home/oldmanmike/.stack/programs/x86_64-linux/ghc-7.10.2/lib/ghc-7.10.2/bin/ghc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Activity

  1. radix commented on Sep 19, 2015

    @radix
    Contributor

    You may have the a symlink libtinfo.so, but it doesn't appear to be pointing to an existing file (your ls ... |grep libtinfo command would have shown the destination file as another line if it had existed).

    I don't have any idea why your libtinfo.so.5 disappeared, though.

  2. zimurgh commented on Sep 19, 2015

    @zimurgh
    Author

    Found this issue, but I've already installed the package the solution involves. It doesn't seem to work. It's also flagged out of date.

  3. zimurgh commented on Sep 19, 2015

    @zimurgh
    Author

    The PKGBUILD provided by the package (right now) is broken. The maintainer has been provided a working PKGBUILD but just hasn't updated the package yet for some reason. I used the linked PKGBUILD to manually build from source and it worked. I also switched off of haskell-stack-git to haskell-stack, but I doubt that makes a difference for this issue.

  4. arianvp commented on Sep 19, 2015

    @arianvp

    Thanks. I was having a similar issue

  5. jgoux commented on Oct 5, 2015

    @jgoux

    Hello, I had an issue with libtinfo.so as well when doing stack install ghc-mod in my project.
    The installation failed because it didn't find libtinfo.so on my system (ubuntu)
    I resolved the issue by manually creating the symlink which didn't exist :
    locate libtinfo.so
    sudo ln -s /path/to/libtinfo.so.5 /path/to/libtinfo.so 👍

  6. istathar commented on Jul 12, 2016

    @istathar
    Contributor

    Hit this upgrading from Fedora 23 to Fedora 24. Fix at as per @emmanueltouzery 's suggestion at #2300 (comment) to install ncurses-compat-libs (on Fedora) worked.

    AfC

  7. pfaaj commented on Nov 10, 2016

    @pfaaj

    Hit at the same problem while trying to run Cling on Fedora 24. Fixed it by installing ncurses-compat-libs on Fedora 24 just as suggested by @emmanueltouzery / @afcowie.

  8. jairoandre commented on Mar 10, 2017

    @jairoandre

    For ArchLinux users:

    I had this problem on my VM and I solved by installing the libtinfo package from AUR and then creating a symbolic link to /usr/lib/libtinfo.so:

    sudo ln -s /usr/lib/libtinfo.so /usr/lib/libtinfo.so.5

  9. jsc-paneda commented on Apr 4, 2017

    @jsc-paneda

    For ArchLinux users:
    Installing ncurses5-compat-libs from the aur is another solution.

  10. magusz commented on Nov 2, 2017

    @magusz

    Download source from https://ftp.gnu.org/gnu/ncurses/
    ./configure --prefix= --with-termlib --with-shared
    make
    make install

  11. it-is-wednesday commented on Jan 31, 2018

    @it-is-wednesday
    cd /lib 
    sudo ln -s libncurses.so libtinfo.so.5
    

    Solved it for me on Void Linux, GHC 8.2.2 64

  12. DougBeney commented on Feb 27, 2018

    @DougBeney

    Recently noticed this issue popping up out of nowhere. My solution was to create a symbolic link between libtinfo.so.6 as libtinfo.so.5. Hope this helps someone else.

    sudo ln -s /usr/lib/libtinfo.so.6 /usr/lib/libtinfo.so.5
    
  13. walkie commented on Mar 6, 2018

    @walkie

    Ran into this issue on Fedora 27. Following @DougBeney's lead, I was able to workaround it by creating this symlink:

    sudo ln -s /usr/lib64/libtinfo.so.6 /usr/lib64/libtinfo.so
    
  14. BobbyBabes commented on May 7, 2018

    @BobbyBabes

    On Arch Linux everything is already installed with the core packages.
    Because core package ncurses provides everything you require : https://www.archlinux.org/packages/core/x86_64/ncurses/

    Just create a symlink to libncursesw.so.6 with : sudo ln -sf /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.5.
    No need to install anything from the AUR.

    EDIT: When you expand the Package Contents link on the ncurses package page, you will notice usr/lib/libtinfo.so.6, which also is a symlink to /usr/lib/libncursesw.so.6.

  15. added a commit that references this issue on Jul 18, 2018
  16. nandda commented on Mar 12, 2019

    @nandda

    even, i created symlink, then also i got the same error!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions