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

Document which system libraries are required on Linux #26673

Closed
3 tasks done
GChuf opened this issue Nov 24, 2020 · 15 comments
Closed
3 tasks done

Document which system libraries are required on Linux #26673

GChuf opened this issue Nov 24, 2020 · 15 comments
Labels
documentation 📓 platform/linux stale-exempt Used to indicate that stale automation should not run. Must be accompanied by a comment for why

Comments

@GChuf
Copy link

GChuf commented Nov 24, 2020

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    11.0.3
  • Operating System:
    Minimal Raspberry OS - August 20th 2020

Expected Behavior

Electron starts

Actual Behavior

Electron gives an error message:
/usr/local/lib/node_modules/electron/dist/electron: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory.

The folder electron under dist does not exist.

To Reproduce

It does this every time I run "electron" or "node cli.js"

Additional Information

The solution:

In order to run startx on minimal OS, I've installed the following:
sudo apt-get install xserver-xorg-video-all xserver-xorg-input-all xserver-xorg-core xinit x11-xserver-utils
This was not enough to run electron, though.

To solve all the problems with shared libraries, I've run the following:
sudo apt install libnss3-dev libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0

@nornagon
Copy link
Member

It seems like you've solved the problem by installing the missing libraries. Electron requires those libraries to function and will not start on an OS that lacks them.

@GChuf
Copy link
Author

GChuf commented Nov 25, 2020

Yes, I've figured that much ...
I'm reporting this for anyone who might encounter similar problems. It would save me some time if this was mentioned somewhere, but since it was not, I opened this issue.

@nornagon
Copy link
Member

Ah, thanks, that wasn't clear from the description! I'll update the issue title to reflect that.

@nornagon nornagon reopened this Nov 25, 2020
@nornagon nornagon changed the title Error while loading shared libraries on minimal RPI OS Document which system libraries are required on Linux Nov 25, 2020
@max-programming
Copy link

I got this error when I ran electron .. But I am installing whatever @GChuf mentioned. SO let's see what happens now.

I am using WSL Ubuntu.

image

@andredezzy
Copy link

@max-programming do you found a solution?

@max-programming
Copy link

@max-programming do you found a solution?

Sadly no. Now I don't use WSL

@andredezzy
Copy link

@max-programming do you found a solution?

Sadly no. Now I don't use WSL

Ah, thanks. I found a relative solution that is: Install the libraries with de Windows bash/CMD, and later can use the WSL run the Yarn or NPM commands, but never run yarn install or npm install on WSL.

@max-programming
Copy link

@max-programming do you found a solution?

Sadly no. Now I don't use WSL

Ah, thanks. I found a relative solution that is: Install the libraries with de Windows bash/CMD, and later can use the WSL run the Yarn or NPM commands, but never run yarn install or npm install on WSL.

yep! That's the only solution possible! Forgot it completely.
I didn't like switching so now I am completely on Powershell 😅

@yeasin72
Copy link

yeasin72 commented Sep 3, 2021

image
I am getting this problem after that

@U-DI-Page
Copy link

@max-programming do you found a solution?

Sadly no. Now I don't use WSL

Ah, thanks. I found a relative solution that is: Install the libraries with de Windows bash/CMD, and later can use the WSL run the Yarn or NPM commands, but never run yarn install or npm install on WSL.

yep! That's the only solution possible! Forgot it completely. I didn't like switching so now I am completely on Powershell 😅

How do you install the libraries with de Windows bash/CMD, I try to install it on powershell, but got failed,"UNC path is not support"

@popuguytheparrot
Copy link

any updates?

1 similar comment
@aliasadidev
Copy link

any updates?

juliankoehn added a commit to signageful/player-wayland that referenced this issue Jan 7, 2023
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Jan 26, 2023
@github-actions
Copy link
Contributor

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2023
@marcospgp
Copy link

marcospgp commented Jan 11, 2024

Looking for this info as well, trying to run electron in a node docker container

Version in package.json: "electron": "^22.0.3"

The list of dependencies that fixed it for me is:

# Electron runtime (non-build) dependencies.
# Discovered by trial & error.
# See more: https://github.com/electron/electron/issues/26673
# Build dependencies: https://www.electronjs.org/docs/latest/development/build-instructions-linux
RUN apt-get update \
    && apt-get install -y \
    libnss3 \
    libatk1.0-0 \
    libatk-bridge2.0-0 \
    libcups2 \
    libdrm2 \
    libgtk-3-0 \
    libgbm1 \
    libasound2

I went through the process of installing one by one and looking for the next error related to a missing dependency.

It would really help to include this in documentation, similarly to how build dependencies are listed here: https://www.electronjs.org/docs/latest/development/build-instructions-linux

Edit: No more dependency issues but other issues sprung up. The list above seems to not be exhaustive. Will try to go with electron build time dependencies.

@erickzhao erickzhao added stale-exempt Used to indicate that stale automation should not run. Must be accompanied by a comment for why and removed stale labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📓 platform/linux stale-exempt Used to indicate that stale automation should not run. Must be accompanied by a comment for why
Projects
None yet
Development

No branches or pull requests