[FIXED] pngquant failed to build, make sure that libpng-dev is installed

pngquant failed to build, make sure that libpng-dev is installed NPM install

When we run the command npm install it's showing an error.

# npm install
output:-

pngquant failed to build, make sure that libpng-dev is installed

To resolve this with the following steps:-

Check the libpng with the following command.
available package version

# rpm -qa | grep libpng

pngquant failed to build, make sure that libpng-dev is installed

Now install the libpng package with all dependencies with the following command.

# yum install -y libpng.i686
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     |  38 kB     00:00
 * base: mirror.dhakacom.com
 * epel: ftp.nluug.nl
 * extras: mirror.dhakacom.com
 * remi-php72: remi.xpg.com.br
 * remi-safe: remi.xpg.com.br
 * updates: mirrors.nhanhoa.com
Examplerepo                                              | 2.9 kB     00:00
base                                                     | 3.6 kB     00:00
epel                                                     | 5.3 kB     00:00
extras                                                   | 3.4 kB     00:00
nodesource                                               | 2.5 kB     00:00
remi-php72                                               | 3.0 kB     00:00
remi-safe                                                | 3.0 kB     00:00
updates                                                  | 3.4 kB     00:00
(1/5): remi-php72/primary_db                               | 223 kB   00:06
(2/5): remi-safe/primary_db                                | 1.5 MB   00:09
(3/5): updates/7/x86_64/primary_db                         | 5.0 MB   00:10
(4/5): epel/x86_64/primary_db                              | 6.7 MB   00:13
(5/5): epel/x86_64/updateinfo                              | 975 kB   00:13
Resolving Dependencies
--> Running transaction check
---> Package libpng.i686 2:1.5.13-7.el7_2 will be installed
--> Processing Dependency: libz.so.1 for package: 2:libpng-1.5.13-7.el7_2.i686
--> Processing Dependency: libm.so.6(GLIBC_2.0) for package: 2:libpng-1.5.13-7.e                                                                                       l7_2.i686
--> Processing Dependency: libm.so.6 for package: 2:libpng-1.5.13-7.el7_2.i686
--> Processing Dependency: libc.so.6(GLIBC_2.11) for package: 2:libpng-1.5.13-7.                                                                                       el7_2.i686
--> Running transaction check
---> Package glibc.x86_64 0:2.17-222.el7 will be updated
--> Processing Dependency: glibc = 2.17-222.el7 for package: glibc-headers-2.17-                                                                                       222.el7.x86_64
--> Processing Dependency: glibc = 2.17-222.el7 for package: glibc-devel-2.17-22                                                                                       2.el7.x86_64
--> Processing Dependency: glibc = 2.17-222.el7 for package: glibc-common-2.17-2                                                                                       22.el7.x86_64
---> Package glibc.i686 0:2.17-260.el7_6.5 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2                                                                                       .17-260.el7_6.5.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-260.el7_6.5.i68                                                                                       6
---> Package glibc.x86_64 0:2.17-260.el7_6.5 will be an update
---> Package zlib.x86_64 0:1.2.7-17.el7 will be updated
---> Package zlib.i686 0:1.2.7-18.el7 will be installed
---> Package zlib.x86_64 0:1.2.7-18.el7 will be an update
--> Running transaction check
---> Package glibc-common.x86_64 0:2.17-222.el7 will be updated
---> Package glibc-common.x86_64 0:2.17-260.el7_6.5 will be an update
---> Package glibc-devel.x86_64 0:2.17-222.el7 will be updated
---> Package glibc-devel.x86_64 0:2.17-260.el7_6.5 will be an update
---> Package glibc-headers.x86_64 0:2.17-222.el7 will be updated
---> Package glibc-headers.x86_64 0:2.17-260.el7_6.5 will be an update
---> Package nss-softokn-freebl.i686 0:3.36.0-5.el7_5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch        Version                 Repository    Size
================================================================================
Installing:
 libpng                  i686        2:1.5.13-7.el7_2        base         215 k
Installing for dependencies:
 glibc                   i686        2.17-260.el7_6.5        updates      4.3 M
 nss-softokn-freebl      i686        3.36.0-5.el7_5          base         211 k
 zlib                    i686        1.2.7-18.el7            base          91 k
Updating for dependencies:
 glibc                   x86_64      2.17-260.el7_6.5        updates      3.7 M
 glibc-common            x86_64      2.17-260.el7_6.5        updates       12 M
 glibc-devel             x86_64      2.17-260.el7_6.5        updates      1.1 M
 glibc-headers           x86_64      2.17-260.el7_6.5        updates      683 k
 zlib                    x86_64      1.2.7-18.el7            base          90 k

Transaction Summary
================================================================================
Install  1 Package  (+3 Dependent packages)
Upgrade             ( 5 Dependent packages)

Total size: 22 M
Total download size: 4.8 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): zlib-1.2.7-18.el7.i686.rpm                          |  91 kB   00:06
(2/4): libpng-1.5.13-7.el7_2.i686.rpm                      | 215 kB   00:08
(3/4): nss-softokn-freebl-3.36.0-5.el7_5.i686.rpm          | 211 kB   00:08
(4/4): glibc-2.17-260.el7_6.5.i686.rpm                     | 4.3 MB   00:22
--------------------------------------------------------------------------------
Total                                              219 kB/s | 4.8 MB  00:22
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : glibc-common-2.17-260.el7_6.5.x86_64                        1/14
  Updating   : glibc-2.17-260.el7_6.5.x86_64                               2/14
  Updating   : glibc-headers-2.17-260.el7_6.5.x86_64                       3/14
  Updating   : glibc-devel-2.17-260.el7_6.5.x86_64                         4/14
  Updating   : zlib-1.2.7-18.el7.x86_64                                    5/14
  Installing : nss-softokn-freebl-3.36.0-5.el7_5.i686                      6/14
  Installing : glibc-2.17-260.el7_6.5.i686                                 7/14
  Installing : zlib-1.2.7-18.el7.i686                                      8/14
  Installing : 2:libpng-1.5.13-7.el7_2.i686                                9/14
  Cleanup    : glibc-devel-2.17-222.el7.x86_64                            10/14
  Cleanup    : glibc-headers-2.17-222.el7.x86_64                          11/14
  Cleanup    : zlib-1.2.7-17.el7.x86_64                                   12/14
  Cleanup    : glibc-common-2.17-222.el7.x86_64                           13/14
  Cleanup    : glibc-2.17-222.el7.x86_64                                  14/14
  Verifying  : glibc-2.17-260.el7_6.5.i686                                 1/14
  Verifying  : glibc-headers-2.17-260.el7_6.5.x86_64                       2/14
  Verifying  : nss-softokn-freebl-3.36.0-5.el7_5.i686                      3/14
  Verifying  : zlib-1.2.7-18.el7.i686                                      4/14
  Verifying  : zlib-1.2.7-18.el7.x86_64                                    5/14
  Verifying  : glibc-devel-2.17-260.el7_6.5.x86_64                         6/14
  Verifying  : glibc-2.17-260.el7_6.5.x86_64                               7/14
  Verifying  : 2:libpng-1.5.13-7.el7_2.i686                                8/14
  Verifying  : glibc-common-2.17-260.el7_6.5.x86_64                        9/14
  Verifying  : glibc-devel-2.17-222.el7.x86_64                            10/14
  Verifying  : glibc-headers-2.17-222.el7.x86_64                          11/14
  Verifying  : zlib-1.2.7-17.el7.x86_64                                   12/14
  Verifying  : glibc-common-2.17-222.el7.x86_64                           13/14
  Verifying  : glibc-2.17-222.el7.x86_64                                  14/14

Installed:
  libpng.i686 2:1.5.13-7.el7_2

Dependency Installed:
  glibc.i686 0:2.17-260.el7_6.5     nss-softokn-freebl.i686 0:3.36.0-5.el7_5
  zlib.i686 0:1.2.7-18.el7

Dependency Updated:
  glibc.x86_64 0:2.17-260.el7_6.5       glibc-common.x86_64 0:2.17-260.el7_6.5
  glibc-devel.x86_64 0:2.17-260.el7_6.5 glibc-headers.x86_64 0:2.17-260.el7_6.5
  zlib.x86_64 0:1.2.7-18.el7

Complete!

This command install package libpng with all it's dependencies.

Now type again npm install

# npm install

Now it's working fine  Thanks for visit!

Also, Visit How to install NPM

 

Blog type: 

Add new comment

Authored By

Sandeep Gurjar

Hy all, This is Sandeep Gurjar am the founder of hostingride.in. I am a Redhat Certified Engineer (RHCE) / AWS Solutions Architect-Associate and working as an system administrator since 2016.

Follow us on

Facebook​  Twitter  LinkedIn  Google+