LoginSignup
13
13

More than 5 years have passed since last update.

Mavericksにアップデートしたら(?)ImageMagickが動かなくなってた

Last updated at Posted at 2014-07-31

Rubyでmin_magick使おうとしたらimagemagickが動かなくなってることに気がついた.
Mavericksにアップデートする前は使えてたのでアップデートしたのが原因と思ってます(確定ではないすが).

コマンド実行するとこんな感じのエラーがでる。

$ convert 
dyld: Library not loaded: /usr/local/lib/libltdl.7.dylib
  Referenced from: /usr/local/Cellar/imagemagick/6.8.9-5/bin/convert
  Reason: image not found
Trace/BPT trap: 5

--build-from-sourceを付けてインストールすると直るという方がいらっしゃったので
https://github.com/Homebrew/homebrew/issues/14325

$ brew uninstall imagemagick
$ brew install imagemagick --build-from-source
==> Installing imagemagick dependency: xz
==> Downloading http://fossies.org/linux/misc/xz-5.0.5.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/xz/5.0.5
==> make install
?  /usr/local/Cellar/xz/5.0.5: 58 files, 1.5M, built in 52 seconds
==> Installing imagemagick
==> Downloading https://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.8.9-5.tar.xz
######################################################################## 100.0%
==> ./configure --disable-osx-universal-binary --prefix=/usr/local/Cellar/imagemagick/6.8.9-5 --enable-shared --disable-static --without-pango --with-modules --disable-openmp --w
checking for lt_dlinit in -lltdl... no
checking if libltdl package is complete... no
configure: error: in `/private/tmp/imagemagick-Ml4Y/ImageMagick-6.8.9-5':
configure: error: libltdl is required for modules build
See `config.log' for more details

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

あれビルドにこける...

こうですか先生!
https://github.com/Homebrew/homebrew/issues/27226


$ brew remove libtool
$ brew install libtool --universal
$ brew uninstall imagemagick
$ brew install imagemagick --build-from-source

ビルド成功!

$ identify 20140405_194813-1.jpg 
identify: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/501.
$ brew install libjpeg
Warning: jpeg-8d already installed

jpegが入っているのに使えない〜.


$ brew uninstall jpeg
$ brew install jpeg
$ brew uninstall imagemagick
$ brew install imagemagick  --with-libtiff

再インストールしたら動いた。

$ identify 20140405_194813-1.jpg 
20140405_194813-1.jpg JPEG 2410x2075 2410x2075+0+0 8-bit sRGB 698KB 0.000u 0:00.000

最終的な原因がわからん...

13
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13