imagemin / jpegoptim-bin

jpegoptim bin-wrapper that makes it seamlessly available as a local dependency
https://github.com/tjko/jpegoptim
MIT License
24 stars 8 forks source link

Statically link libjpeg(-turbo?) #11

Open valpackett opened 7 years ago

valpackett commented 7 years ago

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?

sindresorhus commented 6 years ago

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.

Fgruntjes commented 6 years ago

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.