Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zimurgh opened this issue Sep 19, 2015 · 15 comments
Closed

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

zimurgh opened this issue Sep 19, 2015 · 15 comments

Comments

@zimurgh
Copy link

zimurgh commented Sep 19, 2015

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
@radix
Copy link
Contributor

radix commented Sep 19, 2015

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.

@zimurgh
Copy link
Author

zimurgh commented Sep 19, 2015

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.

@zimurgh
Copy link
Author

zimurgh commented Sep 19, 2015

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.

@zimurgh zimurgh closed this as completed Sep 19, 2015
@arianvp
Copy link

arianvp commented Sep 19, 2015

Thanks. I was having a similar issue

@jgoux
Copy link

jgoux commented Oct 5, 2015

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 👍

@istathar
Copy link
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

@pfaaj
Copy link

pfaaj commented Nov 10, 2016

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.

@jairoandre
Copy link

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

@jsc-paneda
Copy link

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

@magusz
Copy link

magusz commented Nov 2, 2017

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

@it-is-wednesday
Copy link

cd /lib 
sudo ln -s libncurses.so libtinfo.so.5

Solved it for me on Void Linux, GHC 8.2.2 64

@DougBeney
Copy link

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

@walkie
Copy link

walkie commented Mar 6, 2018

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

@BobbyBabes
Copy link

BobbyBabes commented May 7, 2018

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.

@nandda
Copy link

nandda commented Mar 12, 2019

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests