安装 ImageMagick 时,Mac OSX 上未定义体系结构 x86_64: 的符号

安装 ImageMagick 时,Mac OSX 上未定义体系结构 x86_64: 的符号

我正在尝试使用 homebrew 在我的雪豹 MacOSX 上安装 imagemagick。

当我跑步时:

sudo brew install imagemagick

此时它会中断并显示以下错误日志。

ld: warning: ignoring file /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/libpangoft2-1.0.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: ignoring file /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/libpango-1.0.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
ld: warning: ignoring file /Library/Frameworks/Mono.framework/Versions/2.10.8/lib/libintl.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
  "_pango_ft2_font_map_new", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_ft2_font_map_set_resolution", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_ft2_font_map_set_default_substitute", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_font_map_create_context", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_language_from_string", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_context_set_language", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_context_set_base_dir", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_context_set_base_gravity", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_context_set_gravity_hint", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_new", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_auto_dir", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_ellipsize", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_justify", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_single_paragraph_mode", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_wrap", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_indent", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_alignment", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_font_description_from_string", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_font_description_set_size", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_font_description", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_font_description_free", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_markup", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_text", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_context_changed", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_get_pixel_extents", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_width", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_layout_set_height", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
  "_pango_ft2_render_layout", referenced from:
      _ReadCAPTIONImage in coders_caption_la-caption.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [coders/caption.la] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2
config.log was copied to /Users/kengimel/Library/Logs/Homebrew
==> Build Environment
CPU: 8-core 64-bit sandybridge
MacOS: 10.6.8-i386
Xcode: 3.2.6
CC: /usr/bin/gcc-4.2
CXX: /usr/bin/g++-4.2
LD: /usr/bin/gcc-4.2
CFLAGS: -Os -w -pipe -march=core2 -msse4
CXXFLAGS: -Os -w -pipe -march=core2 -msse4
CPPFLAGS: -I/usr/X11/include
LDFLAGS: -L/usr/X11/lib
MAKEFLAGS: -j8
Error: Failed executing: make install (imagemagick.rb:135)

答案1

我重新安装了libjpeg 来自这里然后解除链接并链接jpeg

brew unlink jpeg
brew link jpeg

它修复了错误。希望这对你有用。

答案2

为我解决这个问题的方法是更新 brew 然后安装 imagemagick:

  • brew update
  • brew install imagemagick

相关内容