Laravel-mix: postInstall script fails with mozjpeg. ¿What does this mean?

Created on 17 Feb 2018  Â·  6Comments  Â·  Source: JeffreyWay/laravel-mix

  • Laravel Mix Version: 2.0.0
  • Node Version (node -v): v8.6.0
  • NPM Version (npm -v): 5.6.0
  • OS: Ubuntu 16.04 64bits

Description:

After the npm install, the postInstall script fails with mozjpeg.

> [email protected] postinstall /home/zaqueo/www/virtuagora-core/node_modules/mozjpeg
> node lib/install.js

  âš  The `/home/zaqueo/www/virtuagora-core/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 --disable-dependency-tracking --with-jpeg8  --prefix="/home/zaqueo/www/virtuagora-core/node_modules/mozjpeg/vendor" --bindir="/home/zaqueo/www/virtuagora-core/node_modules/mozjpeg/vendor" --libdir="/home/zaqueo/www/virtuagora-core/node_modules/mozjpeg/vendor" && make -j4 && make install -j4
Command failed: autoreconf -fiv
/bin/sh: 1: autoreconf: not found

    at ChildProcess.exithandler (child_process.js:271:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Socket.stream.socket.on (internal/child_process.js:348:11)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at Pipe._handle.close [as _onclose] (net.js:547:12)

Steps To Reproduce:

A fresh install of laravel-mix

$ npm install
stale

Most helpful comment

i had the same issue with the latest homestead ...

i had to install the following deps:

sudo apt-get install autoconf libtool pkg-config nasm build-essential libpng16-dev

All 6 comments

If I remember correctly, then you need to install gcc g++ & python (at least in a docker container based on node:7-alpine).

Ah.. just noticed that you are on ubuntu 16.04. According to this (old) thread, you might want to sudo apt-get install libtool automake autoconf nasm

I had the same problem running npm install inside latest Homestead, installing missing dependencies solved my issue:

$ sudo apt install pkg-config nasm

i had the same issue with the latest homestead ...

i had to install the following deps:

sudo apt-get install autoconf libtool pkg-config nasm build-essential libpng16-dev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

For Arch Linux users:
sudo pacman -S make gcc libtool automake autoconf nasm pkg-config.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rderimay picture rderimay  Â·  3Comments

terion-name picture terion-name  Â·  3Comments

amin101 picture amin101  Â·  3Comments

hasnatbabur picture hasnatbabur  Â·  3Comments

dtheb picture dtheb  Â·  3Comments