1

I use sharp library for my image processing in the node js script which in turn is running my test cases using jest-image-snapshot.

I have got this error

/lib64/libz.so.1: version `ZLIB_1.2.9' not found

Found similar issue on NodeJS app on OpenShift: /lib64/libz.so.1: version `ZLIB_1.2.9' not found and tried preloading the dependency.

But then, I have got error on preloading as well

ERROR: ld.so: object '/opt/app-root/src/node_modules/sharp/vendor/lib/libz.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

Please help to resolve this..

I have been trying this in my Windows OS

NOTE: The same script works fine in a mac OS

namokarm
  • 668
  • 1
  • 7
  • 20
  • What is in your LD_LIBRARY_PRELOAD? – Mircea Jul 25 '18 at 15:55
  • "scripts": { "test": "LD_PRELOAD='./node_modules/sharp/vendor/lib/libz.so' node testRunner" }, – KRISHNAVENI Aug 09 '18 at 10:31
  • I meant LD_PRELOAD environment variable (i.e. echo $LD_PRELOAD or env | grep LD_PRELOAD) If it is set to something, try to unset it, then run again npm install. You can get an interactive bash session on your docker container. – Mircea Aug 09 '18 at 21:04

0 Answers0