Hello. I have an error when install package. How can I use it on Apple Silicone?
yarn add v1.22.10
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
error /Users/denis/Projects/Jpegoptim/node_modules/jpegoptim-bin: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: /Users/denis/Projects/Jpegoptim/node_modules/jpegoptim-bin
Output:
⚠ Command failed: /Users/denis/Projects/Jpegoptim/node_modules/jpegoptim-bin/vendor/jpegoptim --version
dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.9.dylib
Referenced from: /Users/denis/Projects/Jpegoptim/node_modules/jpegoptim-bin/vendor/jpegoptim
Reason: no suitable image found. Did find:
/usr/local/opt/jpeg/lib/libjpeg.9.dylib: mach-o, but wrong architecture
/opt/homebrew/Cellar/jpeg/9d/lib/libjpeg.9.dylib: mach-o, but wrong architecture
⚠ jpegoptim pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c ./configure --prefix="/Users/denis/Projects/Jpegoptim/node_modules/jpegoptim-bin/vendor" --bindir="/Users/denis/Projects/Jpegoptim/node_modules/jpegoptim-bin/vendor"
checking build system type... arm-apple-darwin20.3.0
checking host system type... arm-apple-darwin20.3.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for jpeg_read_header in -ljpeg... no
Cannot find libjpeg or you have too old version (v6 or later required).
at /Users/denis/Projects/Jpegoptim/node_modules/execa/index.js:231:11
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 0)
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Hello. I have an error when install package. How can I use it on Apple Silicone?