[SOLVED] Error: pngquant failed to build, make sure that libpng-dev is installed
I’m using centos 7.4
Error: pngquant failed to build, make sure that libpng-dev is installed
while executing
# npm install
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
while trying to install libpng-devel , it say’s already installed
Solution
Update the nodejs & npm version if it’s using old one.
I have updated to
Nodejs Version
[[email protected] ~]# node -v v8.10.0
Npm version
[[email protected] ~]# npm -v 5.7.1
Check the installed libpng-devel on your server.
[[email protected] ~]# rpm -qa |grep libpng libpng-1.5.13-7.el7_2.x86_64 libpng-devel-1.5.13-7.el7_2.x86_64
If you are using epel repo,then it will install the latest version. For more libpng release check
[[email protected] ~]# yum list |grep libpng
I have installed following releases
yum install libpng12-1.2.50-10.el7.x86_64 libpng12-devel-1.2.50-10.el7.x86_64
move the node modules
mv node_modules node_modules_bak
Then type
# npm install
Done 100 % working … cheers 🙂
Work, thanks!!!!
My node version is v10.16.3 and npm version is 6.13.1
Still I’m getting this issue, Do you know how to resolve that?
cheers … one bottle of beer