imagemin-webp icon indicating copy to clipboard operation
imagemin-webp copied to clipboard

Please install the libjpeg development package before building

Open sunxf94 opened this issue 5 years ago • 13 comments

My libjpeg-devel version is 1.2.0. I run my npm with imagemin-webp, but have this error. Could you help me? I have done my best for it Error: JPEG support not compiled. Please install the libjpeg development package before building. Error! Could not process file /tmp/c7048e23-4296-4ddf-bab8-154b1f84e6c4 Error! Cannot read input picture file '/tmp/c7048e23-4296-4ddf-bab8-154b1f84e6c4'

sunxf94 avatar Mar 27 '19 08:03 sunxf94

Same thing for me, failing even after installing libjpeg libjpeg-devel on a docker amazon linux image

inakianduaga avatar Apr 30 '19 10:04 inakianduaga

I also had this problem, running from google functions. I was using Node 6, I seen in later versions these had been added to Node, I upgraded to 10 runtime, and the situation was resolved. I tried alot of different plugins and packages to add compatibility and it was no good.

stot3 avatar May 29 '19 18:05 stot3

What versions of node are you running?

stot3 avatar May 29 '19 18:05 stot3

@stot3 hi, I'm having the same issue and my node version is now 10.15.3, could you please help me? the error message:

JPEG support not compiled. Please install the libjpeg development package before building.
Error! Could not process file 'xxx'

nguyenthetoan avatar Jul 23 '19 11:07 nguyenthetoan

I just removed my node_modules folder and it works fine now 🎉

nguyenthetoan avatar Jul 23 '19 11:07 nguyenthetoan

On my Ubuntu system I installed package:

sudo apt-get install libglu1

I had problem with libGLU.so.1

XIOLog avatar Jul 28 '19 19:07 XIOLog

I just removed my node_modules folder and it works fine now 🎉

Thanks @nguyenthetoan , that fixed the issue for me too

FelixLeChat avatar Feb 07 '20 14:02 FelixLeChat

Possibly cwebp-bin issue #39 can explain the behavior above:

  • if the classical format dev libs (png, jpeg, ...) are not installed before cwebp-bin installation is triggered (it is a dependency of imagemin-webp), and (for whatever reason) that installation goes on to compile, then support will be missing. Adding those dev libs afterwards will not change that
  • removing node_modules probably triggers another recompile in cwebp-bin, but this time the dependent libraries are available for compilation and support is added.
  • there is also the special case where there is no compile involved but the dev libs are required at runtime (shared libraries). There adding those libs to the path should be enough to fix it.

Long story short: looks like a cwebp-bin issue and a workaround might be:

  • ensure that the dev library for classical formats (png, jpeg, tiff, dig) are installed
  • remove node_modules/cwebp-bin
  • run npm i

geonanorch avatar Feb 18 '20 09:02 geonanorch

I had the same issue at an docker-image with linux alpine. I solved it by installing following packages:

libjpeg 
jpeg-dev 
libjpeg-turbo-dev 

xstable avatar Feb 09 '21 22:02 xstable

I had this issue too on a Docker Linux image, I solved following the cwep Google guide: https://developers.google.com/speed/webp/docs/compiling#preparing_the_platform

TLDR: apt-get install -y libjpeg-dev libpng-dev libtiff-dev libgif-dev

httpiga avatar May 19 '21 14:05 httpiga

anyone facing issue after installing the packages apt-get install -y libjpeg-dev libpng-dev libtiff-dev libgif-dev libwebp-dev remove your node_modules and re install packages it will work

ahmedkhan847 avatar Jul 20 '22 11:07 ahmedkhan847

в мене така ж помилка Error: JPEG support not compiled. Please install the libjpeg development package before building. я на mac як це виправити

LenaNoskova88 avatar Feb 09 '23 09:02 LenaNoskova88

Hello,

I use the library on a Mac Book Pro M3 (ios 14) and i face the issue. It seems that the version 1.3.2 of cwebp works but not 1.2.x and 1.1.x version.

I have this error : ERROR in Error with 'static/media/xxx.521ff10e9173ca9b5984.jpg': JPEG support not compiled. Please install the libjpeg development package before building.

I tries to clean node_modules and re install project, but nothing works.

Anyone is facing this issue ?

sulfab avatar Jan 05 '24 16:01 sulfab