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

libz.so cannot open shared object file [ARM64] #1092

Open
mihaiav opened this issue Nov 28, 2020 · 6 comments
Open

libz.so cannot open shared object file [ARM64] #1092

mihaiav opened this issue Nov 28, 2020 · 6 comments

Comments

@mihaiav
Copy link

mihaiav commented Nov 28, 2020

I'm building an app using Electron builder with AppImage as target. It worked fine for a while but now I can't run it anymore. Perhaps I updated some libraries or just run apt-get update but I didn't expect that to break AppImage application as they are supposed to be self contained anyway. I get an error that says

libz.so: cannot open shared objet files: No such file or directory

The error is not very helpful as it doesn't say which shared object files it tries to open.

Additionally the error is very bad for the user experience/debug as well as it's visible only when you run the app from the command line. If you run it from GUI you get no error at all... it just doesn't run.

Arch is ARM64.

I also have a x64 built that I test now on a different machine (X64) and works as expected.


$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy

$ uname -a
Linux <redacted-user> 5.8.0-1007-raspi #10-Ubuntu SMP PREEMPT Thus Nov 5 17:52:40 UTC 2020 aarch64 aarch64 GNU/Linux 
hdmi

@mihaiav
Copy link
Author

mihaiav commented Nov 28, 2020

Update:

I browsed through the issues and found how to fix the libz.so issue #964

After installing zlib1g-dev I got another error about libxss1 so I installed this as well and now the app runs.

After all this I find the experience quite bad compared with windows or mac and perhaps it's also one of the reasons(among others) why linux adoption is so low. Seems even installing an app that is supposed to be self contained and "just work" on any linux distribution becomes a big adventure.
How "fatter" would the apps get if they would have libz.so and libxss included in the appimage itself?

@TheAssassin
Copy link
Member

How "fatter" would the apps get if they would have libz.so and libxss included in the appimage itself?

You should've checked our docs. There are other reasons not to bundle such basic libraries. See https://docs.appimage.org/introduction/concepts.html#build-on-old-systems-run-on-newer-systems for more information.

The issue you have there is that the application you build links to a library name that is not commonly available. Make it link against libz.so.1 and you won't have issues any more. This link contains the major version, and is omnipresent all non-esoteric distros.

@mihaiav
Copy link
Author

mihaiav commented Nov 29, 2020

I may be wrong but from the comments I read on #964 the "solution" is actually a workaround CollaboraOnline/richdocumentscode#68 (comment) and the issue seems to be caused by the appimagetool which I assume is used by Electron builder, not "my app".

libxss seems to an issue of my app indeed which is actually an issue of Electron inherited from the Chrome/Chromium browser.

@mihaiav mihaiav changed the title libz.so cannot open shared object file libz.so cannot open shared object file [ARM64] Nov 29, 2020
@Muthu-AMMEW
Copy link

Install zlib1g-dev on Ubuntu or other Linux. like this.

sudo apt-get update -y

sudo apt-get install -y zlib1g-dev

Insert the above two command lines on your terminal. After, Restart your computer or server. Later finishing your problems.

@RanHuang
Copy link

$ lsb_release -a
LSB Version:	:core-4.1-aarch64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.6.1810 (AltArch)
Release:	7.6.1810
Codename:	AltArch

my solution:

sudo yum install -y zlib
rpm -ql zlib
sudo ln -s /usr/lib64/libz.so.1 /usr/lib64/libz.so

image

@EloWeld
Copy link

EloWeld commented Sep 25, 2023

Install zlib1g-dev on Ubuntu or other Linux. like this.

sudo apt-get update -y

sudo apt-get install -y zlib1g-dev

Insert the above two command lines on your terminal. After, Restart your computer or server. Later finishing your problems.

Man, respect. It works

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

5 participants