vsTerminus / Discord-NP

Last.FM Now Playing info in your Discord status message
MIT License
43 stars 6 forks source link

Ubuntu - libcrypt.so.2: cannot open shared object file: No such file or directory #19

Closed ramma closed 3 years ago

ramma commented 3 years ago

Trying to run version 1.3 on a fresh Ubuntu 20.04 install and the only output I'm getting is error while loading shared libraries: libcrypt.so.2: cannot open shared object file: No such file or directory

Figured that meant libcrypt.so.2 was just not installed, but the closest thing that seemed related in apt is libcrypt1 and it's already installed.

Appreciate any help!

vsTerminus commented 3 years ago

Hey, terribly sorry about this. This is the same issue as #18, basically I forgot to include certain files with the packaged binary on macOS and on Linux. I will have to upload new versions.

In the meantime you could try the "run from source" steps in the readme if you are so inclined. It's a little more involved, but basically guarantees it'll work.

vsTerminus commented 3 years ago

Please try https://github.com/vsTerminus/Discord-NP/releases/tag/1.4 - It should hopefully solve the problem.

ramma commented 3 years ago

Thanks for the update! It doesn't appear to throw the libcrypto error now, but it's now giving the error ./discordnp-linux: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./discordnp-linux)

It doesn't look like glibc 2.33 is available yet in Ubuntu/Debian package manager as it was only released a few weeks ago, and it probably won't be until 21.04's release next month.

vsTerminus commented 3 years ago

Darn! I actually wondered about that when I was looking at what did and didn't get included in the executable.

Ironically there is a line in https://github.com/vsTerminus/Discord-NP/blob/master/Makefile (Line 16) that I left commented out because I wasn't sure if it was necessary. Turns out it is!

I'll get a new version out today hopefully that should address this.

vsTerminus commented 3 years ago

Please try https://github.com/vsTerminus/Discord-NP/releases/tag/1.5

ramma commented 3 years ago

Still running into it complaining about not having gblic 2.33. I checked what versions my Ubuntu 20.04 install has avaiable to download ideally shouldn't break lots of stuff, but no luck really.

In case it may help, here what my terminals spit out from a few commands. Explained a bit below.

Screenshot from 2021-03-02 09-31-50

In the first terminal I'm just verifiing I even had glibc installed. again, then checked for alternative install candidates hoping a newer one might have appeared. Only to be shot down by the repo gods for I am on the most recent glib version I can be on (2.31-0ubuntu9.2) without potentially breaking lots of things.

The second terminal just shows what exactly happens when I try running the script. Sadly the 1.5 is only able to give the same error as 1.4 did in the comment earlier here.

I may have some more ideas on my end for troublshooting, but won't have time for almost a week to really try fiddling with things again.

vsTerminus commented 3 years ago

That's good info, thank you.

So basically the issue is that I'm running and compiling this on Arch Linux and Ubuntu is always a few versions behind because it isn't a rolling release distro.

I tried to manually pack libc-2.33.so (and a number of other dependencies identified by running lsof against the process). I'm not sure if it will work, but please give this one a try:

discord-np-1.5.2-linux.zip

If that doesn't work there are basically two paths forward: Either I compile it against an older version of glibc or you run it from source (following the steps in the readme).

ramma commented 3 years ago

Same error with that version sadly. If I have time I can try compiling from source, but I'm not terribly experienced with doing so.

vsTerminus commented 3 years ago

The ultimate solution here is probably to have someone maintain a package for different distros. I lack the time, so instead I will try to improve the run from source instructions for Linux and stop providing the binary file. Unless someone knows a better way.