Solve the Problem to Install Imagemagick, Failed to download resource libpng

Solve the Problem to Install Imagemagick, Failed to download resource libpng, You just need to follow these steps:

1. if You are install Imagemagick, then You need to type :

brew install Imagemagick

2. Good luck, if everything works fine and install imagemagick easily, Else

3. if you getting any problem like, Failed to download resource libpng, during install Imagemagick,

4. follow these steps. you need to first thing first:

brew update

5. but during update you getting any error, then copy and paste below code in your terminal:


go on : >>> cd /usr/local/

and then type in local directory: git reset --hard FETCH_HEAD

If everything going good, then you will get these lines:

Checking out files: 100% (3711/3711), done.
HEAD is now at a4ad985 uninstall: simplify logic

6. Now again type:

brew update

Note: It will take time, so be passions, and don't touch it.

and finally it will update Homebrew, and install the latest version, automatically.

That's it. Everything working now. Final step

7. Now Again install

 brew install imagemagick

Enjoy!

Installing dependencies for imagemagick: xz, libpng, libtiff, freetyp
==> Installing imagemagick dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.2.yosemite.bottle.ta
######################################################################## 100.0%
==> Pouring xz-5.2.2.yosemite.bottle.tar.gz
🍺  /usr/local/Cellar/xz/5.2.2: 59 files, 1.7M
==> Installing imagemagick dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.19.yosemite.bott
######################################################################## 100.0%
==> Pouring libpng-1.6.19.yosemite.bottle.tar.gz
🍺  /usr/local/Cellar/libpng/1.6.19: 17 files, 1.2M
==> Installing imagemagick dependency: libtiff
==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.6.yosemite.bott
######################################################################## 100.0%
==> Pouring libtiff-4.0.6.yosemite.bottle.tar.gz
🍺  /usr/local/Cellar/libtiff/4.0.6: 259 files, 3.9M
==> Installing imagemagick dependency: freetype
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.6_1.yosemite.bot
######################################################################## 100.0%
==> Pouring freetype-2.6_1.yosemite.bottle.tar.gz
Warning: This keg was marked linked already, continuing anyway
🍺  /usr/local/Cellar/freetype/2.6_1: 60 files, 2.6M
==> Installing imagemagick
==> Downloading https://homebrew.bintray.com/bottles/imagemagick-6.9.2-7.yosemit
######################################################################## 100.0%
==> Pouring imagemagick-6.9.2-7.yosemite.bottle.tar.gz
🍺  /usr/local/Cellar/imagemagick/6.9.2-7: 1455 files, 22M