ImageMagick error

前端 未结 5 1227
甜味超标
甜味超标 2021-02-04 01:19

When trying to run ImageMagick via node-imagemagick on my Grunt task, i get this error from ImageMagick:

Warning: Command failed: identify: unable to load

相关标签:
5条回答
  • 2021-02-04 01:25

    I came across this issue too when upgrading from Mt.Lion to Mavericks. I found an issue in homebrew's github repo. The fix that worked for me was:

    $ brew uninstall imagemagick
    $ brew install imagemagick --build-from-source
    
    0 讨论(0)
  • 2021-02-04 01:47

    This is what finally worked for me after a bunch of installs and uninstalls. I removed and reinstalled imagemagick with these options

    brew install imagemagick --with-fontconfig --with-ghostscript --with-libtiff --with-webp

    I am only using jpeg and png for now, and am not sure how these options help, but worth a try.

    0 讨论(0)
  • 2021-02-04 01:49

    OSX Mavericks seems break the link of jpeg lib. All you need to do is relink the jpeg, then reinstall imagemagick.

    brew unlink jpeg
    brew link jpeg
    

    Then reinstall imagemagick from source

    brew uninstall imagemagick
    brew install imagemagick --build-from-source
    

    Now you can check if jpeg is in the delegate

    identify -list configure | grep DELEGATES
    

    It should have jpeg now

    DELEGATES bzlib mpeg freetype jng jpeg lcms lzma png tiff xml zlib

    0 讨论(0)
  • 2021-02-04 01:50

    ImageMagick's module dependencies are out of date by the systems upgrade. You'll need to re-install homebrew packages. See this articles "Upgrading homebrew packages on OSX Mavericks", or "Install ImageMagicK on OSX Lion."

    Why is ImageMagick trying to load JPG coder at /usr/local/Cellar/imagemagick/6.8.8-9/lib/ImageMagick//modules-Q16/coders/jpeg.la

    ImageMagick is expecting a static library for JPEG. The module is simply not there, or unreadable.

    Why the double slash after ImageMagick// ?

    This is common with homebrew. It's safe, and will resolve to ImageMagick/.

    ... know a way to fix it?

    Run the followin in Terminal.app

    brew uninstall imagemagick
    brew update
    brew cleanup
    brew doctor
    brew install imagemagick
    
    0 讨论(0)
  • 2021-02-04 01:51

    This worked for me:

    brew uninstall imagemagick@6 
    brew install imagemagick@6 
    PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig gem install rmagick
    
    0 讨论(0)
提交回复
热议问题