jpegoptim-bin icon indicating copy to clipboard operation
jpegoptim-bin copied to clipboard

Statically link libjpeg(-turbo?)

Open valpackett opened this issue 7 years ago • 2 comments

Trying to run imagemin-jpegoptim on AWS Lambda:

/var/task/node_modules/jpegoptim-bin/vendor/jpegoptim: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

There is no system libjpeg… Maybe it should be linked statically?

valpackett avatar May 10 '17 19:05 valpackett

Yes, ideally it should, but from experience, it's not super easy to statically link binaries on Linux. Happy to receive a good pull request though.

sindresorhus avatar Dec 27 '17 11:12 sindresorhus

Hello,

Just wanted to let you know I had the same issue, after installing libjpeg-turbo-devel and rebuild the package fixed the issue.

My environment was CentOS btw.

Hope it helps.

Fgruntjes avatar Jan 18 '18 21:01 Fgruntjes