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

libtinfo.so.5: cannot open shared object file #104

Closed
starper opened this issue Feb 9, 2019 · 22 comments · Fixed by #125
Closed

libtinfo.so.5: cannot open shared object file #104

starper opened this issue Feb 9, 2019 · 22 comments · Fixed by #125

Comments

@starper
Copy link

starper commented Feb 9, 2019

After the latest software update on my Pop!_OS (which is basically Ubuntu), spago started to throw an error:

spago: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

After some investigation I found out that I have libtinfo.so.6 not libtinfo.so.5 and the way to fix this problem is to create this symlink:

sudo ln -s /path/to/libtinfo.so.6 /path/to/libtinfo.so.5

I understand that it's not exactly a spago issue, but I still want to bring this up

  • to save people that are facing this issue some googling time
  • to find out if this fix is a correct way solve this problem
@justinwoo
Copy link
Contributor

Related: commercialhaskell/stack#1012

@f-f
Copy link
Member

f-f commented Feb 9, 2019

After reading that issue I'm not sure there's a "proper way to fix it" on our side 🤔

@f-f
Copy link
Member

f-f commented Feb 9, 2019

Of course an option would be to compile a static binary for Linux.

@justinwoo
Copy link
Contributor

I wouldn't want to impose that cost on everyone anyway. If someone really cares, they can patch the binary themselves e.g. https://github.com/justinwoo/easy-purescript-nix/blob/master/spago.nix

But many programs won't work without ncurses and other dependencies anyway

@f-f
Copy link
Member

f-f commented Feb 10, 2019

Turns out the reason why this happens is that we build spago on the fpco/stack-build Docker image, which is based on Ubuntu 16.04, which ships libtinfo.so.5, while it looks like the latest Ubuntu ships with libtinfo.so.6.

Since the latest Ubuntu has issues in compiling Haskell (source: a colleague has to use Nix to compile our Haskell stuff on his latest Ubuntu, and this is probably also the reason why FP Complete is still on Ubuntu 16), we probably cannot do anything about this. (short of statically compiling, which I'd avoid for now, as it's some effort to configure)

So I'll close this as "we cannot do much", but it's probably worth adding an entry to the FAQ?

@f-f f-f closed this as completed Feb 10, 2019
@starper
Copy link
Author

starper commented Feb 16, 2019

it's probably worth adding an entry to the FAQ?

Yeah, I think it's a good idea

@f-f f-f reopened this Feb 16, 2019
@f-f f-f closed this as completed in #125 Mar 15, 2019
f-f added a commit that referenced this issue Mar 15, 2019
This contains several small documentation fixes:

- Adds a comment about pointing the package-set to a specific commit instead of a tag
- Now the CLI help displays correctly that the additional purs flags are for purs compile
- Fix #123, fix #119, fix #104: added a FAQ entry
- Fix #132: document installation on Nix
- Fix #135: clarify bundling docs
@masaeedu
Copy link

This is an issue on Arch as well FWIW.

@f-f
Copy link
Member

f-f commented May 22, 2019

@masaeedu thanks for the report! Fix for the recommendation up in #207

elliotdavies pushed a commit to elliotdavies/spago that referenced this issue Jul 1, 2019
This contains several small documentation fixes:

- Adds a comment about pointing the package-set to a specific commit instead of a tag
- Now the CLI help displays correctly that the additional purs flags are for purs compile
- Fix purescript#123, fix purescript#119, fix purescript#104: added a FAQ entry
- Fix purescript#132: document installation on Nix
- Fix purescript#135: clarify bundling docs
@ford-prefect
Copy link

As a note for Fedora users who end up here, you need to install ncurses-compat-libs

@ismailsunni
Copy link

Thanks @ford-prefect

TristanCacqueray added a commit to podenv/hub that referenced this issue Feb 22, 2020
@drewboardman
Copy link

This is an issue on Arch as well FWIW.

Did you fix this by just symlinking? @masaeedu

@ford-prefect
Copy link

@drewboardman you could try installing ncurses5-compat-libs

@drewboardman
Copy link

@ford-prefect that worked. Thank you

@Charles-Schleich
Copy link

What worked for me
sudo apt-get install libtinfo5
Hope this helps someone

@idhowardgj94
Copy link

@Charles-Schleich work for me, thank you

@f-f
Copy link
Member

f-f commented Dec 11, 2020

@idhowardgj94 which version of Spago are you on? This should not happen anymore in the latest version (0.17)

@senorsmile
Copy link

confirming that installing ncurses5-compat-libs from the aur (on manjaro for me, so should work on arch too) solves the problem.

@f-f
Copy link
Member

f-f commented Jan 10, 2021

@senorsmile this should not be necessary anymore since a while - which version of Spago are you using?

@senorsmile
Copy link

@f-f 0.19.0

@hdgarrood
Copy link
Contributor

I guess the message about libtinfo missing is coming from the compiler rather than from spago itself now, since the compiler does still require libtinfo.

@f-f
Copy link
Member

f-f commented Jan 10, 2021

@hdgarrood oh right, that makes perfect sense. Thank you!

@sevillaarvin
Copy link

As a note for Fedora users who end up here, you need to install ncurses-compat-libs

For manjaro as well:

pamac install ncurses5-compat-libs

Available via the AUR repo: https://forum.manjaro.org/t/cant-find-a-way-to-install-libtinfo-so-5/35129/3?u=6205f10b80

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

Successfully merging a pull request may close this issue.