-
Notifications
You must be signed in to change notification settings - Fork 24
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
errors thrown for jpg image #9
Comments
Hey! Would you mind to attach the minimum set of files and the command you run to make it possible to reproduce the error? Also, please, make sure you're using the latest version of Optimizt (2.4.0). |
I have already upgraded optimizt to 2.4.0 pictures attached as zip file |
Looks like the Maybe your OS lacks of required libs to build In order to check this, you need to completely remove Optimizt, reinstall it and provide a log of the installation process. |
I am on arch linux. OS provided version of jpegoptim is 1.4.6.2 I have uninstalled optimizt and after cleaning npm cache, i have reinstalled it again. same error repeats again. log file showing installation process is attached for your reference : |
Optimizt does not depend on system installed During the Optimizt installation process, the jpegoptim-bin package should run a postinstall script, which builds the An example of a successful Optimizt installation: npm -g install @funboxteam/optimizt
/usr/bin/optimizt -> /usr/lib/node_modules/@funboxteam/optimizt/cli.js
> [email protected] install /usr/lib/node_modules/@funboxteam/optimizt/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Using cached /root/.npm/_libvips/libvips-8.10.5-linux-x64.tar.br
> [email protected] postinstall /usr/lib/node_modules/@funboxteam/optimizt/node_modules/gif2webp-bin
> node lib/install.js
✔ gif2webp pre-build test passed successfully
> [email protected] postinstall /usr/lib/node_modules/@funboxteam/optimizt/node_modules/gifsicle
> node lib/install.js
⚠ Response code 404 (Not Found)
⚠ gifsicle pre-build test failed
ℹ compiling from source
✔ gifsicle built successfully
> [email protected] postinstall /usr/lib/node_modules/@funboxteam/optimizt/node_modules/guetzli
> node lib/install.js
⚠ Command failed: /usr/lib/node_modules/@funboxteam/optimizt/node_modules/guetzli/vendor/guetzli --verbose
Guetzli JPEG compressor. Usage:
guetzli [flags] input_filename output_filename
Flags:
--verbose - Print a verbose trace of all attempts to standard output.
--quality Q - Visual quality to aim for, expressed as a JPEG quality value.
--memlimit M - Memory limit in MB. Guetzli will fail if unable to stay under
the limit. Default is 6000 MB
--nomemlimit - Do not limit memory usage.
⚠ guetzli pre-build test failed
ℹ compiling from source
✔ guetzli built successfully
> [email protected] postinstall /usr/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin
> node lib/install.js
⚠ Command failed: /usr/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin/vendor/jpegoptim --version
/usr/lib/node_modules/@funboxteam/optimizt/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
✔ jpegoptim built successfully
> [email protected] postinstall /usr/lib/node_modules/@funboxteam/optimizt/node_modules/pngquant-bin
> node lib/install.js
✔ pngquant pre-build test passed successfully
@funboxteam/[email protected]
added 402 packages from 362 contributors in 71.283s as you can see from the log, the postinstall script for > [email protected] postinstall /usr/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin
> node lib/install.js
⚠ Command failed: /usr/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin/vendor/jpegoptim --version
/usr/lib/node_modules/@funboxteam/optimizt/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
✔ jpegoptim built successfully if the build fails, the log may look like this: > [email protected] postinstall /home/xxx/.nvm/versions/node/v12.16.3/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin
> node lib/install.js
⚠ Command failed: /home/xxx/.nvm/versions/node/v12.16.3/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin/vendor/jpegoptim --version
/home/xxx/.nvm/versions/node/v12.16.3/lib/node_modules/@funboxteam/optimizt/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="/home/xxx/.nvm/versions/node/v12.16.3/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin/vendor" --bindir="/home/xxx/.nvm/versions/node/v12.16.3/lib/node_modules/@funboxteam/optimizt/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). here we can see that it was not possible to build The log you provided does not contain information about running postinstall scripts, so there is no way to conclude that Please make sure you don't have postinstall scripts disabled using ignore-scripts. |
Does the file really exist? If so, does it have permissions to run? |
/home/zenova/projects/nvm/.nvm/versions/node/v12.9.1/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin/vendor/jpegoptim - this file doesn't exist. /home/zenova/projects/nvm/.nvm/versions/node/v12.9.1/lib/node_modules/@funboxteam/optimizt/node_modules/jpegoptim-bin
|
OK, now we know for sure that In order to understand why this happened, we need the postinstall script log like here: #9 (comment) |
libjpeg-turbo 2.0.6-1 was installed |
Maybe you have Please try this: npm -g uninstall @funboxteam/optimizt
npm config set ignore-scripts false
npm -g install @funboxteam/optimizt |
Thanks for your suggestion. log is produced as shown below :
|
Good, i see no errors here. So i guess it works now? |
it works without errors. |
You're welcome. |
optimizt working well on png images and also producing webp and avif format images.
when it is run on png files, it is throwing following error :
The text was updated successfully, but these errors were encountered: