question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sharp With Electron - Uncaught Error: /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9'

See original GitHub issue

Sorry 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:

  1. Upgrade the system libz from the vulnerable v1.2.8 to the latest v1.2.11
  2. 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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, Jul 16, 2018

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).

1reaction
Slapboxcommented, Apr 29, 2018

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: version `ZLIB_1.2.9' not found - conflict with node ...
I'm getting this error when running my program: Error: /lib/x86_64-linux-gnu/libz.so.1: version 'ZLIB_1.2.9' not found ... Any thoughts?
Read more >
lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found
so.1 cannot open shared object file: No such file or directory. sudo: fatal error, unable to load plugins. – namrogom.
Read more >
1570462 – ZLIB_1.2.9 not found in Rocketchat Image
Description of problem: The following error occurs on container startup which results in the rocketchat server failing to start Exception in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found