funbox / optimizt

CLI image optimization tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does it work on m1 macbooks?

boringcoding opened this issue · comments

I'm getting
npm ERR! Cannot find libjpeg or you have too old version (v6 or later required).
But I have libjpeg installed via homebrew.

I managed to install it like this:
CPPFLAGS="-I /opt/homebrew/Cellar/jpeg/9d/include" LDFLAGS="-L /opt/homebrew/Cellar/jpeg/9d/lib" npm i -g @funboxteam/optimizt

For me I had to replace in path 9d with 9e

Yes, it depends on the version of libjpeg you have installed.

brew info libjpeg

jpeg: stable 9e (bottled)
Image manipulation library
https://www.ijg.org/
/opt/homebrew/Cellar/jpeg/9e (21 files, 904.2KB) *
  Poured from bottle on 2022-03-02 at 00:56:01
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/jpeg.rb
License: IJG