Closed skywickenden closed 5 years ago
I had this in a docker container today and the fix was to add this before the npm install
in our Dockerfile
:
RUN apt-get update && apt-get install -y libglu1
Hello everyone. Faced the exact same problem.
/path/to/root/node_modules/cwebp-bin/vendor/cwebp: cannot execute binary file
OS is macOS 10.15.5. Any suggestions?
I'm just copying this issue from imagemin-webp as the source of the problem was here.
The problem is fixable with the actions below, but thought it would be good to put here for anyone else encountering this problem as it is valid for any library using cwebp-bin, such as webp-converter
I'm getting the following error on a fresh installation.
/path/to/root/node_modules/cwebp-bin/vendor/cwebp: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
imagemin-webp is implemented as follows:
(async () => { const files = await imagemin([file], outputDirectory, { use: [ imageminWebp({quality: 90}) ] }); })();
I've triple checked that both file and outputDirectory are valid - and they work fine if I use imagemin without imageminWebp.
OS is Ubuntu 18.04. Any suggestions?
I solved this by installing the following missing libraries:
apt-get install libglu1 apt-get install libxi6 libgconf-2-4 ldconfig
No idea why they are missing. This Ubuntu server is pretty vanilla.
Do you know which packages this needs on node alpine?
just solved a similar issue in an alternative way:
if you're using docker or "stretch" debian (which is the default docker tagged version for node:14
and below), consider using "bullseye" or "buster" instead as it has a newer version of zlib
(1.2.11 v.s. 1.2.8): https://packages.debian.org/bullseye/zlib1g
ERROR in spawn /opt/node_app/app/node_modules/cwebp-bin/vendor/cwebp ENOENT
Facing same issue in docker apline image for node 16.15.1. If we run build locally in ubuntu then it works fine.
I have similar problem:
I'm just copying this issue from imagemin-webp as the source of the problem was here.
The problem is fixable with the actions below, but thought it would be good to put here for anyone else encountering this problem as it is valid for any library using cwebp-bin, such as webp-converter
I'm getting the following error on a fresh installation.
imagemin-webp is implemented as follows:
I've triple checked that both file and outputDirectory are valid - and they work fine if I use imagemin without imageminWebp.
OS is Ubuntu 18.04. Any suggestions?
I solved this by installing the following missing libraries:
No idea why they are missing. This Ubuntu server is pretty vanilla.