John John - 3 months ago 31
Node.js Question

error while loading shared libraries: libgtk-x11-2.0.so.0:

I am trying to get started with electron to build desktop apps, and I ran into the following error while trying to start the application.

error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory


this occur after in ran the
electron main.js
via bash on my windows 10 device.

Electron was installed as follow:

npm install electron --save-dev


https://www.npmjs.com/package/electron

Any help would be greatly appreciated

Answer

You need to apt-get install libgtk2.0-0 and install an X server for Windows, such as xming.