Sharp With Electron - Uncaught Error: /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9'
See original GitHub issueSorry to create a new issue for this, but all previous threads are locked and the preferred method to attempt to solve this is still unclear. Could you please point me in the right direction on this?
I’m using Electron 1.8.4
, but have also tried Electron 2.0.0
. Is it possible with either of the two methods to package a working application including Sharp
? I’m running Linux Mint 18.3 x64
. I’ve also tried Linux Mint 17.3 x64
Using: LD_PRELOAD=./node_modules/sharp/vendor/lib/libz.so
Results in: ERROR: ld.so: object './node_modules/sharp/vendor/lib/libz.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Thanks very much for any advice you can offer.
From #892
so there’s nothing sharp can do here. Two possible options are:
- Upgrade the system libz from the vulnerable v1.2.8 to the latest v1.2.11
- Use LD_PRELOAD=/path/to/node_modules/sharp/vendor/lib/libz.so electron … so the system will use the sharp-provided v1.2.11 instead of its own v1.2.8.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Correct,
process.versions.libz
is the version of libz statically linked to at Node build time. Electron treats Node as a shared library, so can’t use Node’s libz, hence my suggestion that Electron could be modified to ship with its own libz as a shared library (as it already ships with its own libffmpeg as a shared library).Actually as soon as I stepped away from the computer I realized I had the wrong path… Silly mistake… I am going to see how far I can get with this solution. Thanks very much for your (insanely fast) reply!