Closed wawanopoulos closed 2 years ago
@s17billsp: My CentOS server has libpng-devel v1.5.13 already and things are not working. I will attempt to fix the version of imagemin-pngquant
to 5.0.0
and see what happens.
@skatetdieu yum installing libpng-devel
fixed this for me on RHEL 7. THANK YOU!
Setting imagemin-pngquant
to 5.0.0
did not work. I've run out of time, knowledge, and patience to fix this issue.
I'm compiling assets locally and then committing them in git, instead. This is ridiculous.
I managed to fix this[temporarily] on CentOS 6 using npm shrinkwrap
command.
This helps us to manage the inter-dependencies.
imagemin-pngquant
to version "5.0.0" i.e "imagemin-pngquant": "5.0.0"
"pngquant-bin": "3.1.1"
dependency from imagemin-pngquant
requires and define the dependency as below
"dependencies": { "pngquant-bin": { "version":"3.1.1" } }
"imagemin-pngquant": "5.0.1"
dependency from "img-loader"
requires and define the dependency as below
"dependencies":{ "imagemin-pngquant": { "version":"5.0.0" } }
npm shrinkwrap
Note: this command is useful only once and for the second time it replaces the npm-shrinkwrap.json
file with latest available dependencies. Moreover, I used this to avoid the current issue I'm facing only on CI server. So I only ran npm shrinkwrap
when I want a build to happen.
For Ubuntu I used: wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \ && sudo dpkg -i /tmp/libpng12.deb \ && rm /tmp/libpng12.deb
similar problem here with macOS... anybody has a workaround?
RequestError: pngquant failed to build, make sure that libpng is installed.
PS: comes from laravel-mix install.
Tried :
$brew install libpng
checked whether installed or not.
brew info libpng
Result:
libpng: stable 1.6.34 (bottled), HEAD Library for manipulating PNG images http://www.libpng.org/pub/png/libpng.html /usr/local/Cellar/libpng/1.6.23 (25 files, 1.2MB) Poured from bottle on 2016-07-01 at 22:28:13 /usr/local/Cellar/libpng/1.6.34 (26 files, 1.2MB) * Poured from bottle on 2018-03-28 at 10:31:39 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libpng.rb ==> Options --HEAD Install HEAD version
$brew install pngquant
then removed node_modules folder and tried
$npm install
So, after restarting macOS (and npm install), finally it worked :)
The issue comes from new release of imagemin-pngquant
v5.1 requires pngquant-bin@4.0.0
The quick fix is to downgrade imagemin-pngquant
to 5.0.* which is using pngquant-bin@3.1.1
Run this command and commit your package.json
npm install --save-exact imagemin-pngquant@5.0.*
I managed to fix this problem by installing libpng-dev
in Ubuntu 17.10.
Just run sudo apt install libpng-dev
and then npm update
same problem on centos i tried all... yum install libpng-devel.. installed then run npm again, error.
I think it will not be a fundamental solution and not be applied to all, but I was able to install it with the --force
option (using Docker's node: 9.3.0-alpine image)
same problem on centos i tried all... yum install libpng-devel.. installed then run npm again, error.
I have installed all packages with libpng in title on Centos. It works for me
# yum install libpng* -y
same problem here on Fedora 27, managed to get it to work by installing libpng12 and libpng12-devel
# dnf install libpng12 libpng12-devel
@rangermeier your suggestion worked wonderfully! Thank you!
@rangermeier Works perfect, thank you!
I'm still struggling to get this work on CentOS6, the recommended yum install libpng* -y
doesn't just work.
npm install
fails when using the devtoolset toolchain but would manage to install
pngquant-bin when not using the devtoolset environment.As a workaround I'm now trying to perform the npm install
in two steps: once inside the devtoolset in order to install most modules, then exit the devtoolset and run it again just for pngquant-bin, something like this:
echo 'npm install || true' | scl enable devtoolset-3 bash
npm install || true
I'll report back once I have some results.
Later edit This did the trick for us, our build is now green.
@cristim I used it on CentOS but had to install libpgn-devel
with yum instead of libpng.
@skatetdieu I have installed all the libpng packages, including libpng-devel. As I said, the problem in my case seems to be caused by the devtoolset. It works without it for pngquant-bin, but I need it for other native packages that I require a C++11 compiler.
@cristim hmm, yeah I don't know how to resolve that. I just installed libpng-devel
and it worked for me.
Still not working on Debian 9.4 :(
Any ideas when it will be resolved?
same problem to me! I fixed it use this:
...
"image-webpack-loader": "^4.2.0",
"imagemin-pngquant":"5.0.0",
"pngquant-bin":"3.1.1",
...
yum install -y gcc gcc-c++ make openssl-devel libpng libpng-devel
I don't know why so solved!
It seems that the pre-compiled binary is linking to libpng12, so you must install libpng12 to allow the pre-compiled to work
on CentOS 7:
yum install -y libpng12
Or install the libpng-devel to build it
yum install -y libpng-devel
as well as other dependencies (gcc, make, ...)
It's funny that this binary has been uploaded for three years, and was broken at least for 4 months (#73) because new OS are shipping libpng15 instead of libpng12, but still not noticed until v4.0.0...
If we do ship binaries, can't we ship a static binary instead of linking and then depending on whatever is available on the host?
I was able to solve this issue on my node:9-alpine
container by installing the following apk add --no-cache make gcc g++ libc-dev libpng-dev bash
or apk add --no-cache bash alpine-sdk libpng-dev
if you don't care about the images' size.
some help for windows users will be appreciated
I ran: sudo apt-get install libpng-dev before npm install and it solved it for me.
Hope it helps.
On Centos 7 | NPM 3.10.10 | Node v6.14.0 This worked for me: sudo yum install libpng-devel
i am also hitting this same issue. it appears during install this package does a call over to http://pngquant.org and denying the connection. testing with telnet pngquant.org tells me to visit http://sblam.com
the connection denied to their main site is currently failing the install.
1525392226.494 0 172.22.6.8 TCP_DENIED/200 0 CONNECT pngquant.org:80 - HIER_NONE/- -
I'm on debian 9.4, none of the above workarounds works.
Repo owner, please merge available PR's and correct this please.
Laravel-mix / Spark installations completely unavailable because of this!
Same here on Alpine3.7, yarn install wont work - one of the most annoying issues out there right now I am expiriencing it with every new installation on every new OS and still don't have a fix that just works everywhere..
For Laravel/Spark users, see this comment (CentOS): https://github.com/JeffreyWay/laravel-mix/issues/1611#issuecomment-387254894 - this fixed it for me.
This work for me, Ubuntu 18.04 https://stackoverflow.com/a/49465604
Same issue for me on Win10
In my case: 1.npm update gulp 2.npm install
and that solve in my case... :P
Hi guys also take a note that this issue can be related to non-existing swap partition at your VMs. I just created it it started to work. https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
@ragonzalezm19 Thank you, manually installing the older libpng12
version fixed the issue for me on Ubuntu 18.04.
If anyone is struggling in Debian 9(Stretch) or Debian based Docker container,
apt-get -y install libpng* nodejs make gcc g++ libc-dev bash
has solved the issue for me. After that npm install
successfully installed pnguant-bin
This work for me, Ubuntu 18.04 https://stackoverflow.com/a/49465604
wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb \
&& sudo dpkg -i /tmp/libpng12.deb \
&& rm /tmp/libpng12.deb
@InstanceOfMichael is there any reason that you used http instead of https?
Had the same issue on Ubuntu 18.04, fixed with sudo apt install libpng-dev
@moff Thanks worked for me too :)
16.04 LTS, 17.04 or 18.04 LTS
install the following
sudo apt install libpng* build-essential gcc make autoconf libtool pkg-config nasm
OR copy this
"sudo apt install libpng* build-essential gcc make autoconf libtool pkg-config nasm"
after installation of packages.
delete node_modules folder and package-lock.json file. run npm install.
you're welcome.
This worked for me, using node:alpine
(by this time, 10.5.0
)
FROM node:alpine
RUN apk add --no-cache --update make gcc g++ libc-dev libpng-dev automake autoconf libtool
centos 7.4 i run this script " yum install libpng-devel " and delete the folder 'node_modules' and rerun npm install , finally got success .
@InstanceOfMichael and @ragonzalezm19 Installing the older version worked on Ubuntu 18.04 LTS server- for laravel 5.6.
Any updates on this? Has there been a new release which fixes this?
As some others have pointed, my use of pngquant isn't direct and I'm unable to make any changes. If you push a patch release fixing this, it should start working for everyone who's using this indirectly.
Ran into this on CentOS 7.5 using yarn. Stumbled across issue #77 and realized I needed libpng12
and libpng12-devel
. Install is working now.
Solution listed by @skeith69 worked for me using Ubuntu 18.04 LTS on Windows WSL with a fresh Laravel 5.6 install.
Centos 6.10
sudo yum install -y gcc make libpng-devel
yarn
getting an error on running npm install -g pngquant-bin
. running this command instead npm install -g pngquant-bin --allow-root --unsafe-perm=true
. got this from issue #81
I'am getting this error today when i try to make a npm update on my project:
I already install libpng-dev library, and i always get this error.