Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please install the libjpeg development package before building #16

Open
sunxf94 opened this issue Mar 27, 2019 · 13 comments
Open

Please install the libjpeg development package before building #16

sunxf94 opened this issue Mar 27, 2019 · 13 comments

Comments

@sunxf94
Copy link

sunxf94 commented Mar 27, 2019

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'

@inakianduaga
Copy link

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

@stot3
Copy link

stot3 commented May 29, 2019

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
Copy link

stot3 commented May 29, 2019

What versions of node are you running?

@nguyenthetoan
Copy link

@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
Copy link

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

@XIOLog
Copy link

XIOLog commented Jul 28, 2019

On my Ubuntu system I installed package:

sudo apt-get install libglu1

I had problem with libGLU.so.1

@FelixLeChat
Copy link

FelixLeChat commented Feb 7, 2020

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

Thanks @nguyenthetoan , that fixed the issue for me too

@geonanorch
Copy link

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

@xstable
Copy link

xstable commented Feb 9, 2021

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 

@httpiga
Copy link

httpiga commented May 19, 2021

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

@ahmedkhan847
Copy link

ahmedkhan847 commented Jul 20, 2022

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

@LenaNoskova88
Copy link

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

@sulfab
Copy link

sulfab commented Jan 5, 2024

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests