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

ncurses error when using binary #2106

Closed
faddat opened this issue Dec 9, 2018 · 23 comments
Closed

ncurses error when using binary #2106

faddat opened this issue Dec 9, 2018 · 23 comments
Assignees

Comments

@faddat
Copy link
Contributor

faddat commented Dec 9, 2018

This release:

https://github.com/mimblewimble/grin/releases/tag/v0.4.2

When using the v0.4.2 binary, I get the following ncurses error:

./grin: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

I don't get this error when building using cargo from source code. When I build it myself Grin works just fine :). Arch Linux. Happy to investigate further.

@quentinlesceller
Copy link
Member

Hey @faddat, just curious if you tried to install ncurses on your Arch linux?

@tsusanka
Copy link
Contributor

I believe this is because Arch Linux has already the newer version of libncursesw.so - libncursesw.so.6:

$ ls /usr/lib/libncursesw.so.6
/usr/lib/libncursesw.so.6
$ ls /usr/lib/libncursesw.so.5
ls: cannot access '/usr/lib/libncursesw.so.5': No such file or directory

Creating a simlink 6 -> 5 works just fine:

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

and exactly the same goes for /usr/lib/libtinfo.so. Grin lunches just fine after these fixes

@Lazydayz137
Copy link

I installed 5 on a vultr server running Ubuntu 18.xx, still get the error. Not paying attention thought I might need the newer 6.1, so compiled and installed. Same error of course and the simlink back to 5 still gives initial error. Going to try rolling back to good old 16.xx I think.

@Lazydayz137
Copy link

Works like a charm, no ncurses install required(5 already there) on a Vultr Ubuntu 16.04 clean install w/upgrades. Just as an update to my previous comment. Doesn't change OP issue.

@jeroenev
Copy link

jeroenev commented Feb 10, 2019

same issue here, grin 1.0.1
using Manjaro (arch based)

@jasonzhouu
Copy link

jasonzhouu commented Feb 10, 2019

fixed this problem in ubuntu 18.10, grin 1.0.1:

cd /lib/x86_64-linux-gnu
ln -s libncursesw.so.6 libncursesw.so.5
ln -s libtinfo.so.6 libtinfo.so.5

in ubuntu 18.04, this problem don't exist, and these two file is appeared in version 5.

@jeroenev
Copy link

cding into /usr/lib/ and using your symlink commands from there seems to solve the issue on manjaro (and probably Arch as well)

@quentinlesceller
Copy link
Member

Looks like the a distro related error and not a grin error itself. Closing.

@jeroenev
Copy link

Seems to me like an issue with grin not recognizing libncurse version 6, only version 5
Once ubuntu updates to v6 this issue will also occur there

@jeroenev
Copy link

Seems like it already occurs in version 18.10 reading the comments above

@cool007zqw
Copy link

I believe this is because Arch Linux has already the newer version of libncursesw.so - libncursesw.so.6:

$ ls /usr/lib/libncursesw.so.6
/usr/lib/libncursesw.so.6
$ ls /usr/lib/libncursesw.so.5
ls: cannot access '/usr/lib/libncursesw.so.5': No such file or directory

Creating a simlink 6 -> 5 works just fine:

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

and exactly the same goes for /usr/lib/libtinfo.so. Grin lunches just fine after these fixes

After making the link, it comes with another error:

Segmentation fault (core dumped)

@jeroenev
Copy link

@cool007zqw try the code from jasonzhouu, that fixed the errors for me on Manjaro

@mjssln
Copy link

mjssln commented May 7, 2019

fixed this problem in ubuntu 18.10, grin 1.0.1:

cd /lib/x86_64-linux-gnu
ln -s libncursesw.so.6 libncursesw.so.5
ln -s libtinfo.so.6 libtinfo.so.5

in ubuntu 18.04, this problem don't exist, and these two file is appeared in version 5.

Ubuntu 19.04
Fix for me !
Thx

@FTLIan
Copy link

FTLIan commented Sep 4, 2019

I am on Ubuntu 19.04 and the symlinks have not solved the problem for me. After running the above commands, trying to run grin gives me these errors:

./grin: /lib/x86_64-linux-gnu/libtinfo.so.5: version NCURSES_TINFO_5.0.19991023' not found (required by ./grin)
./grin: /lib/x86_64-linux-gnu/libncursesw.so.5: versionNCURSESW_5.6.20061217' not found (required by ./grin)
./grin: /lib/x86_64-linux-gnu/libncursesw.so.5: version `NCURSESW_5.1.20000708' not found (required by ./grin)

Thank you for any help you can provide.

@quentinlesceller
Copy link
Member

Hi @FTLIan, I will spin up a 19.04 VM and see if I can help you.

@quentinlesceller
Copy link
Member

Hi @FTLIan unfortunately I was not able to run the binaries on Ubuntu 19.04. I opened the following issue #3022.

@Sky-Bly
Copy link

Sky-Bly commented Jan 27, 2020

Resolves:

sudo apt-get install -y libncursesw5

@lehnberg
Copy link
Collaborator

lehnberg commented Apr 8, 2020

@quentinlesceller I just encountered this issue as well (Debian Buster) with newer versions of libncurses already installed on the system.

@Sky-Bly's fix worked for me (thanks for that)

sudo apt-get install -y libncursesw5

...but I would tend to agree with @jeroen7s's comment above:

Seems to me like an issue with grin not recognizing libncurse version 6, only version 5

Would be nice if we could get this addressed somehow, I don't think it's obvious for end users that they need to have a specific older version of ncurses installed in order for the binary to work. Perhaps makes sense to reopen?

@slicken
Copy link

slicken commented Apr 9, 2020

I agree, fixing small things like this matter
easy to install/use, with no hurdles is good for adoption

@quentinlesceller
Copy link
Member

I'll take a look.

@quentinlesceller quentinlesceller self-assigned this Apr 9, 2020
@quentinlesceller
Copy link
Member

To clarify: the issue is with the linking of libncursesw-6 which is the wide character library. This looks similar to jeaye/ncurses-rs#151.
However since we are using cursive might be something related to gyscos/cursive#411. We are however using an old version of Cursive 0.12 instead of 0.14.

@quentinlesceller
Copy link
Member

Since libncursesw5 and libncursesw6 uses the same API. Doing an

apt install libncurses5

on Ubuntu solved it (tested on Ubuntu 20.04). I expect it to be the same on other distros.

@chillmatin
Copy link

fixed this problem in ubuntu 18.10, grin 1.0.1:

cd /lib/x86_64-linux-gnu
ln -s libncursesw.so.6 libncursesw.so.5
ln -s libtinfo.so.6 libtinfo.so.5

in ubuntu 18.04, this problem don't exist, and these two file is appeared in version 5.

fixed the issue in pop!_OS 22.04

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