Open xakep139 opened 7 years ago
libpng-dev
is installed
Have the same issue,
@xakep139 have you found a work around ?
@alekaizer, nope. I've decided to replace package with pngquant-bin
dependency with similar package without it
Type sudo apt-get install nodejs-legacy before sudo npm install -g pngquant-bin
Further reading: https://nodejs.org/en/download/package-manager/ A Node.js package is also available in the official repo for Debian Sid (unstable), Jessie (testing) and Wheezy (wheezy-backports) as "nodejs". It only installs a nodejs binary. The nodejs-legacy package installs a node symlink that is needed by many modules to build and run correctly. The Node.js modules available in the distribution official repositories do not need it.
same problem here on ubuntu 17.10
root@latitude a$ sudo npm install pngquant
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
> pngquant-bin@3.1.1 postinstall /root/a/node_modules/pngquant-bin
> node lib/install.js
⚠ The `/root/a/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant built successfully
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN a@1.0.0 No description
npm WARN a@1.0.0 No repository field.
+ pngquant@1.3.0
added 305 packages from 128 contributors in 37.183s
root@latitude a$ sudo npm install pngquant-bin
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
> pngquant-bin@3.1.1 postinstall /root/a/node_modules/pngquant/node_modules/pngquant-bin
> node lib/install.js
⚠ The `/root/a/node_modules/pngquant/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant built successfully
> pngquant-bin@4.0.0 postinstall /root/a/node_modules/pngquant-bin
> node lib/install.js
⚠ The `/root/a/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant pre-build test passed successfully
✖ RequestError: pngquant failed to build, make sure that libpng-dev is installed
at ClientRequest.req.once.err (/root/a/node_modules/got/index.js:111:21)
at Object.onceWrapper (events.js:272:13)
at ClientRequest.emit (events.js:180:13)
at Socket.socketErrorListener (_http_client.js:394:9)
at Socket.emit (events.js:180:13)
at emitErrorNT (internal/streams/destroy.js:64:8)
at process._tickCallback (internal/process/next_tick.js:114:19)
npm WARN a@1.0.0 No description
npm WARN a@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-03-16T08_18_52_426Z-debug.log
says make sure that libpng-dev is installed
but the package is installed already
$ apt-get install libpng-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpng-dev is already the newest version (1.6.34-1).
0 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
@mdaliyan The above problem looks slightly different than yours. I think you're looking for issue 78.
To build pngquant binary you need to have installed make.
apt-get install make
(or similar)
Found viewing install.js
[...]
binBuild.url('http://pngquant.org/pngquant-2.10.1-src.tar.gz', [
'rm ./INSTALL',
`./configure --prefix="${bin.dest()}"`,
`make install BINPREFIX="${bin.dest()}"`
[..]
It must be so @drzippie . I removed nodejs that was installed from repo and compiled it from source. Then I tried to install pngquant-bin
, and it was installed without any problem.
Hello @mdaliyan , I had a similar problem and fixed by installing libpng-dev
with this command:
sudo apt install libpng-dev
grep-status -FProvides,Package -sPackage,Provides,Status libpng-dev Package: libpng12-dev Provides: libpng-dev, libpng12-0-dev, libpng3-dev Status: install ok installed
Still get: pngquant pre-build test passed successfully pngquant failed to build, make sure that libpng-dev is installed
pngquant-bin@4.0.0 node.js version v9.9.0 npm version 5.6.0 Ubuntu 16.04 make 4.1-6 installed
any ideas?
After some debugging I found out that the error on my system (Ubuntu 18.04) was a permission error. My /tmp
directory is mounted on a tmpfs. I was passing the noexec
in my mount options in fstab, which resulted into ./configure
(extracted into a temporary directory) was not executable.
If this is the case, remove noexec
from the mount options in /etc/fstab
. Then remount /tmp
.
sudo mount -o rw,remount /tmp
I hope this helps!
tried: sudo apt-get install -y build-essential libpng-dev
?
@c2h2 thank you it worked ❤
Hello @mdaliyan , thank you. It worked for me. Ubuntu 18.04 Node v10.15.3 npm 6.4.1
sudo npm install -g pngquant-bin@^3.0.0
output: