mozjpeg-bin: Installation fails on Ubuntu 16.10 amd64
Module build failed: Error: /home/oleg/projects/main-panel/node_modules/mozjpeg/vendor/cjpeg: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
I fixed it by installing libpng12 but it is not true way.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 25
- Comments: 18 (3 by maintainers)
This worked for me! installing http://ppa.launchpad.net/hiberis/ppa/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.27-1ubuntu1~ppa1_amd64.deb
I also ran into this issue. https://github.com/imagemin/imagemin-mozjpeg/issues/26 pointed me to the fact that
nasmneeded to be installed, after which the package built from source just fine instead of using the outdated binary.First, make sure you have all the build dependencies installed:
sudo apt-get install autoconf libtool pkg-config nasm build-essentialThen just rebuild the package:
npm rebuild mozjpegPotential workaround:
Same problem on Mac OS. I’m using MacPorts and installing libpng did not help.
I’m encountering the same problem with
libpng16.soon different Linux platforms.I had to fix this by running
sudo apt-get install libpng16-devorsudo apt-get install libpng16-16The newest version uses
libpng16. Please installmozjpeg-binwith related dependencies.Hello
I have probably a proper resolution for this problem. The build image for cjpeg is an ancient debian:8-slim image (so 2 versions behind current stable)
So I updated the image and after rebuild and swap binaries everything seems to work on the current Debian 10 Slim image
https://github.com/imagemin/mozjpeg-bin/pull/61/files
I also had the libpng12.so.0 issue, and fixed with:
elementary OS 5.0 Juno (64-bit) Built on Ubuntu 18.04.2 LTS Linux 4.15.0-51-generic GTK+ 3.22.30
This answer gave the general commands. Thanks @jeremiahgibson91 for the install link!
This works for me, Very very thank you!
What about to implement platform-adaptive library calls?