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

Cannot find libjpeg or you have too old version (v6 or later required). #21

Closed
positlabs opened this issue Jan 29, 2021 · 9 comments
Closed

Comments

@positlabs
Copy link
Contributor

I ran npm install but ran into an issue because of some incorrect path stuff. I had libjpeg installed, but it wasn't in the path.

Cannot find libjpeg or you have too old version (v6 or later required).

I added it to the path in .zprofile and npm install worked after that. If it's not installed, you can run brew install jpeg (on mac)

eval $(/opt/homebrew/Cellar/jpeg/9d/bin shellenv)

Might be worth adding a note to the build section in the readme

@positlabs
Copy link
Contributor Author

Maybe this was a fluke. I can't get it to install now. Seems like others are having the same issue tjko/jpegoptim#46

@xanderfrangos
Copy link
Owner

Hmm, you shouldn't need libjpeg installed. It should compile the library for you. Something must have changed with a dependency. I'll take a look at what's going on. I'm seeing the same error on my end (Mac only).

@positlabs
Copy link
Contributor Author

FWIW I'm on an M1 mac so maybe it doesn't support this arch yet

@xanderfrangos
Copy link
Owner

@positlabs The latest code should be working now. I encountered the same issue on an Intel-based Mac and was able to get it working again. I'll be interested to hear if it runs OK on an M1 Mac as-is. Hopefully I can get proper ARM builds out at some point.

@positlabs
Copy link
Contributor Author

Awesome! I'll check it out. The current mac installer works but most definitely running on Rosetta. Definitely worth looking into, but for now it's working just fine.

@positlabs
Copy link
Contributor Author

Latest code works :)

@Stanzilla
Copy link
Contributor

only blocker for arm builds right now is that the github actions worker for bigsur is in limited beta for now, otherwise very easy to set up!

@xanderfrangos
Copy link
Owner

@Stanzilla Good to know! I'm tempted to pick up a base model M1 Mac Mini, but I don't do enough with MacOS/iOS to justify it. 😅

@dmitry-brok
Copy link

dmitry-brok commented Jan 19, 2023

Hello,

I ve'got the same issue on an x64 PC

checking for jpeg_read_header in -ljpeg... no
Cannot find libjpeg or you have too old version (v6 or later required).

but I want to use either MozJPEG or libjpeg-turbo instead of libjpeg
How should I do this properly?
Actually I built and installed mozjpeg (Ubuntu2210) but could not figure how to activate this option -DUSE_MOZJPEG=1

Thank you in advance
D.

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

4 participants