electron / electron-quick-start

Clone to try a simple Electron app
https://electronjs.org/docs/latest/tutorial/quick-start
Creative Commons Zero v1.0 Universal
10.96k stars 4.91k forks source link

Missing shared libraries #486

Open qbitroot opened 2 years ago

qbitroot commented 2 years ago

When I run npm start, it shows the following output:

> electron-quick-start@1.0.0 start /tmp/electron-quick-start
> electron .

/tmp/electron-quick-start/node_modules/electron/dist/electron: error while loading shared libraries: libcups.so.2: cannot open shared object file: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! electron-quick-start@1.0.0 start: `electron .`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the electron-quick-start@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2021-05-20T16_43_01_585Z-debug.log

As 4th line says, there is no libcups shared library. I tried installing it, but there are new missing shared libraries. I don't use systemd and it may be one of the reasons of bug.

After hours of troubleshooting, I solved it by putting .so libraries from Debian 10 image into the dist directory. You can download them from the attachment (for testing purposes).

DrockDaniel commented 2 years ago

I've never used linxsis

DrockDaniel commented 2 years ago

Sorry I'm pooped out.

fullpl4nch3 commented 2 years ago

im using wsl 2 on windows 11, and im getting the same error. #519 point to this issue. So im kinda stuck in the loop, any ideas?

The error:

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! electron-quick-start@1.0.0 start: electron . npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron-quick-start@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/fullpl4nch3/.npm/_logs/2022-01-24T12_57_29_222Z-debug.log

steps to reproduce: npm install && npm start

genru commented 2 years ago

@qbitroot @fullpl4nch3 if use wsl, please try

rm -rdf node_modules
npm install --platform=win32

to tell dependenies your are running on a win system. this resolved my problem.

burt23 commented 2 years ago

Unfortunately the above command from @genru didn't work for me. Trying to run the overmind dev tools via npx and am running into this same error. Any help greatly appreciated, thank you in advance

tammaroivan commented 1 year ago

Could you try with sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev, that worked for me

PoweredByEnergyDrinks commented 1 year ago

sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev

Thanks @tammaroivan , you legend!

giuliohome commented 1 year ago

Having this issue today in Selenium IDE and I solved it by installing google-chrome in ubuntu on Windows WSL and using vcxsrv as Windows X Server with export DISPLAY ... in .bashrc ... (of course it also worked for this quick start then)

anbarasu97 commented 1 year ago

Could you try with sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev, that worked for me

This worked!!!

LuigiImVector commented 1 year ago

Could you try with sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev, that worked for me

I love you

giuliohome commented 1 year ago

Ok, better to unsubscribe this thread

long9nt commented 1 year ago

Could you try with sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev, that worked for me

awesome

danielwust99 commented 10 months ago

Could you try with sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev, that worked for me

Thanks, worked for me bro!

ValsiRod commented 6 months ago

I ran the same command sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev and got this error: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

what else could I try?

danielwust99 commented 5 months ago

I ran the same command sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev and got this error: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

what else could I try?

Try install the apel release packages before run.

TeqGin commented 4 months ago

I ran the same command sudo apt install libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev and got this error: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

what else could I try?

sudo apt-get install libasound2

this works for me

marcospgp commented 4 months ago

There is this closed issue about documenting runtime (as opposed to build time) dependencies for Electron: https://github.com/electron/electron/issues/26673

manojborugadda commented 1 month ago

Thank you so much @tammaroivan 💯