mozjpeg build failed on mac [solved]
See original GitHub issueany one can help me please i got this error when i install npm on any laravel project
mozjpeg@4.1.1 postinstall /Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/mozjpeg node lib/install.js
⚠ The /Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/mozjpeg/vendor/cjpeg
binary doesn’t seem to work correctly
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: autoreconf -fiv && ./configure --disable-shared --prefix=“/Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/mozjpeg/vendor” --bindir=“/Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/mozjpeg/vendor” --libdir=“/Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/mozjpeg/vendor” && make --jobs=4 && make install --jobs=4
Command failed: autoreconf -fiv
autoreconf: Entering directory `.’
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/local/bin/autoconf --force
configure.ac:22: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/local/bin/autoconf failed with exit status: 1
at ChildProcess.exithandler (child_process.js:198:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
optipng-bin@3.1.4 postinstall /Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/optipng-bin node lib/install.js
⚠ getaddrinfo ENOTFOUND raw.githubusercontent.com raw.githubusercontent.com:443 ⚠ optipng pre-build test failed ℹ compiling from source ✖ Error: ./configure --with-system-zlib --prefix=“/Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/optipng-bin/vendor” --bindir=“/Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/optipng-bin/vendor” && make install Command failed: make install pngrtran.c:98:1: warning: unused function ‘png_rtran_ok’ [-Wunused-function] png_rtran_ok(png_structrp png_ptr, int need_IHDR) ^ 1 warning generated. /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpng.a(pngpread.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpng.a(pngwtran.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpng.a(pngpread.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpng.a(pngwtran.o) has no symbols pngxmem.c:37:32: warning: comparison of constant 2305843009213693951 with expression of type ‘png_uint_32’ (aka ‘unsigned int’) is always false [-Wtautological-constant-out-of-range-compare] if (row_size == 0 || height > (pngx_alloc_size_t)(-1) / sizeof(png_bytep)) ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpngxtern.a(pngxio.o) has no symbols /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpngxtern.a(pngxio.o) has no symbols osys.c:515:25: error: no member named ‘st_atim’ in ‘struct stat’ times[0] = sbuf.st_atim; ~~~~ ^ osys.c:516:25: error: no member named ‘st_mtim’ in ‘struct stat’ times[1] = sbuf.st_mtim; ~~~~ ^ 2 errors generated. make[1]: *** [osys.o] Error 1 make: *** [install] Error 2
at ChildProcess.exithandler (child_process.js:198:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Socket.<anonymous> (internal/child_process.js:351:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:497:12)
pngquant-bin@3.1.1 postinstall /Applications/XAMPP/xamppfiles/htdocs/blog/node_modules/pngquant-bin node lib/install.js
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)
Can you try
One of user has suggested this
brew install automake autoconf libtool dpkg pkgconfig nasm libpng
finally work with me thank you so much i reinstall the hole system two time for this error 😡 thank you so much @ankurk91