tjko / jpegoptim

jpegoptim - utility to optimize/compress JPEG files
http://www.iki.fi/tjko/projects.html
GNU General Public License v3.0
1.56k stars 116 forks source link

Fedora 36, can't install jpegoptim #108

Closed orangecoloured closed 1 year ago

orangecoloured commented 2 years ago

While doing yarn install I get the following error

error /node_modules/jpegoptim-bin: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments: 
Directory: /node_modules/jpegoptim-bin
Output:
Command failed: /node_modules/jpegoptim-bin/vendor/jpegoptim --version
/node_modules/jpegoptim-bin/vendor/jpegoptim: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

jpegoptim pre-build test failed
compiling from source
Error: Command failed: /bin/sh -c ./configure --prefix="/node_modules/jpegoptim-bin/vendor" --bindir="/node_modules/jpegoptim-bin/vendor"

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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 /node_modules/bin-build/node_modules/execa/index.js:231:11

libjpeg-turbo is installed.

chebum commented 2 years ago

It seems this problem surfaced earlier: https://github.com/tjko/jpegoptim/issues/46#issuecomment-791039186

orangecoloured commented 2 years ago

I'm not sure if I understand how to fix this. Do I need to use --with-libjpeg option while yarn install? Or do I need to use LDFLAGS and CPPFLAGS options?