8

昨天我更新到 Mountain Lion,我想启动我的 Rails 应用程序,但在使用 Rmagick gem 时遇到了一些问题。在网上阅读后,我做了以下事情:

  • 安装 Xcode 4.4
  • 安装的开发者工具
  • 安装 Xquartz
  • 使用 brew 卸载 imagemagick
  • 用 brew 安装 imagemagick

在此安装过程中,我收到一个错误:

coders/svg.c:93:10:致命错误:找不到“librsvg/rsvg.h”文件

完整日志

 ==> Downloading http://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.7.7-   6.tar.bz2
    Already downloaded: /Library/Caches/Homebrew/imagemagick-6.7.7-6.tar.bz2
==> Patching
patching file configure
Hunk #1 succeeded at 32371 (offset 447 lines).
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.7.7-6 --enable-shared --disable-st
==> make install
/bin/sh ./config/mkinstalldirs . ltdl/
cp ./ltdl/argz_.h ltdl/argz.h-t
mv ltdl/argz.h-t ltdl/argz.h
make  install-am
  CC     ltdl/argz.lo
  CC     coders/coders_tga_la-tga.lo
  CC     coders/coders_thumbnail_la-thumbnail.lo
  CC     coders/coders_tile_la-tile.lo
  CC     coders/coders_tim_la-tim.lo
  CC     coders/coders_ttf_la-ttf.lo
  CC     coders/coders_txt_la-txt.lo
  CC     coders/coders_uil_la-uil.lo
  CC     coders/coders_url_la-url.lo
  CC     coders/coders_uyvy_la-uyvy.lo
  CC     coders/coders_vicar_la-vicar.lo
  CC     coders/coders_vid_la-vid.lo
  CC     coders/coders_viff_la-viff.lo
  CC     coders/coders_wbmp_la-wbmp.lo
  CC     coders/coders_wpg_la-wpg.lo
  CC     coders/coders_xbm_la-xbm.lo
  CC     coders/coders_xc_la-xc.lo
  CC     coders/coders_xcf_la-xcf.lo
  CC     coders/coders_xpm_la-xpm.lo
  CC     coders/coders_xps_la-xps.lo
  CC     coders/coders_ycbcr_la-ycbcr.lo
  CC     coders/coders_yuv_la-yuv.lo
  CC     coders/coders_jpeg_la-jpeg.lo
  CC     coders/coders_jp2_la-jp2.lo
  CC     coders/coders_png_la-png.lo
  CC     coders/coders_ept_la-ept.lo
  CC     coders/coders_tiff_la-tiff.lo
  CC     coders/coders_x_la-x.lo
  CC     coders/coders_xwd_la-xwd.lo
  CC     coders/coders_aai_la-aai.lo
  CC     magick/magick_libMagickCore_la-accelerate.lo
  CC     magick/magick_libMagickCore_la-animate.lo
  CC     magick/magick_libMagickCore_la-annotate.lo
  CC     magick/magick_libMagickCore_la-artifact.lo
  CC     magick/magick_libMagickCore_la-attribute.lo
  CC     magick/magick_libMagickCore_la-blob.lo
  CC     magick/magick_libMagickCore_la-cache.lo
  CC     magick/magick_libMagickCore_la-cache-view.lo
  CC     magick/magick_libMagickCore_la-cipher.lo
  CC     magick/magick_libMagickCore_la-client.lo
  CC     magick/magick_libMagickCore_la-coder.lo
  CC     magick/magick_libMagickCore_la-color.lo
  CC     magick/magick_libMagickCore_la-colormap.lo
  CC     magick/magick_libMagickCore_la-colorspace.lo
  CC     magick/magick_libMagickCore_la-compare.lo
  CC     magick/magick_libMagickCore_la-composite.lo
  CC     magick/magick_libMagickCore_la-compress.lo
  CC     magick/magick_libMagickCore_la-configure.lo
  CC     magick/magick_libMagickCore_la-constitute.lo
  CC     magick/magick_libMagickCore_la-decorate.lo
  CC     magick/magick_libMagickCore_la-delegate.lo
  CC     magick/magick_libMagickCore_la-deprecate.lo
  CC     magick/magick_libMagickCore_la-display.lo
  CC     magick/magick_libMagickCore_la-distort.lo
  CC     magick/magick_libMagickCore_la-draw.lo
  CC     magick/magick_libMagickCore_la-effect.lo
  CC     magick/magick_libMagickCore_la-enhance.lo
  CC     magick/magick_libMagickCore_la-exception.lo
  CC     magick/magick_libMagickCore_la-feature.lo
  CC     magick/magick_libMagickCore_la-fourier.lo
  CC     magick/magick_libMagickCore_la-fx.lo
  CC     magick/magick_libMagickCore_la-gem.lo
  CC     magick/magick_libMagickCore_la-geometry.lo
  CC     magick/magick_libMagickCore_la-hashmap.lo
  CC     magick/magick_libMagickCore_la-histogram.lo
  CC     magick/magick_libMagickCore_la-identify.lo
  CC     magick/magick_libMagickCore_la-image.lo
  CC     magick/magick_libMagickCore_la-image-view.lo
  CC     magick/magick_libMagickCore_la-layer.lo
  CC     magick/magick_libMagickCore_la-list.lo
  CC     magick/magick_libMagickCore_la-locale.lo
  CC     magick/magick_libMagickCore_la-log.lo
  CC     magick/magick_libMagickCore_la-magic.lo
  CC     magick/magick_libMagickCore_la-magick.lo
  CC     magick/magick_libMagickCore_la-matrix.lo
  CC     magick/magick_libMagickCore_la-memory.lo
  CC     magick/magick_libMagickCore_la-mime.lo
  CC     magick/magick_libMagickCore_la-module.lo
  CC     magick/magick_libMagickCore_la-monitor.lo
  CC     magick/magick_libMagickCore_la-montage.lo
  CC     magick/magick_libMagickCore_la-morphology.lo
  CC     magick/magick_libMagickCore_la-option.lo
  CC     magick/magick_libMagickCore_la-paint.lo
  CC     magick/magick_libMagickCore_la-pixel.lo
  CC     magick/magick_libMagickCore_la-policy.lo
  CC     magick/magick_libMagickCore_la-PreRvIcccm.lo
  CC     magick/magick_libMagickCore_la-prepress.lo
  CC     magick/magick_libMagickCore_la-property.lo
  CC     magick/magick_libMagickCore_la-profile.lo
  CC     magick/magick_libMagickCore_la-quantize.lo
  CC     magick/magick_libMagickCore_la-quantum.lo
  CC     magick/magick_libMagickCore_la-quantum-export.lo
  CC     magick/magick_libMagickCore_la-quantum-import.lo
  CC     magick/magick_libMagickCore_la-random.lo
  CC     magick/magick_libMagickCore_la-registry.lo
  CC     magick/magick_libMagickCore_la-resize.lo
  CC     magick/magick_libMagickCore_la-resample.lo
  CC     magick/magick_libMagickCore_la-resource.lo
  CC     magick/magick_libMagickCore_la-segment.lo
  CC     magick/magick_libMagickCore_la-semaphore.lo
  CC     magick/magick_libMagickCore_la-shear.lo
  CC     magick/magick_libMagickCore_la-signature.lo
  CC     magick/magick_libMagickCore_la-splay-tree.lo
  CC     magick/magick_libMagickCore_la-static.lo
  CC     magick/magick_libMagickCore_la-statistic.lo
  CC     magick/magick_libMagickCore_la-stream.lo
  CC     magick/magick_libMagickCore_la-string.lo
  CC     magick/magick_libMagickCore_la-thread.lo
  CC     magick/magick_libMagickCore_la-timer.lo
  CC     magick/magick_libMagickCore_la-token.lo
  CC     magick/magick_libMagickCore_la-transform.lo
  CC     magick/magick_libMagickCore_la-threshold.lo
  CC     magick/magick_libMagickCore_la-type.lo
  CC     magick/magick_libMagickCore_la-utility.lo
  CC     magick/magick_libMagickCore_la-version.lo
  CC     magick/magick_libMagickCore_la-widget.lo
  CC     magick/magick_libMagickCore_la-xml-tree.lo
  CC     magick/magick_libMagickCore_la-xwindow.lo
  CC     ltdl/loaders/ltdl_libltdlc_la-preopen.lo
  CC     ltdl/ltdl_libltdlc_la-lt__alloc.lo
  CC     ltdl/ltdl_libltdlc_la-lt_dlloader.lo
  CC     ltdl/ltdl_libltdlc_la-lt_error.lo
  CC     ltdl/ltdl_libltdlc_la-ltdl.lo
  CC     ltdl/ltdl_libltdlc_la-slist.lo
  CC     ltdl/loaders/dlopen.lo
  CC     coders/coders_art_la-art.lo
  CC     coders/coders_avs_la-avs.lo
  CC     coders/coders_bgr_la-bgr.lo
  CC     coders/coders_bmp_la-bmp.lo
  CC     coders/coders_braille_la-braille.lo
  CC     coders/coders_cals_la-cals.lo
  CC     coders/coders_caption_la-caption.lo
  CC     coders/coders_cin_la-cin.lo
  CC     coders/coders_cip_la-cip.lo
  CC     coders/coders_clip_la-clip.lo
  CC     coders/coders_cmyk_la-cmyk.lo
  CC     coders/coders_cut_la-cut.lo
  CC     coders/coders_dcm_la-dcm.lo
  CC     coders/coders_dds_la-dds.lo
  CC     coders/coders_debug_la-debug.lo
  CC     coders/coders_dib_la-dib.lo
  CC     coders/coders_dng_la-dng.lo
  CC     coders/coders_dot_la-dot.lo
  CC     coders/coders_dpx_la-dpx.lo
  CC     coders/coders_fax_la-fax.lo
  CC     coders/coders_fd_la-fd.lo
  CC     coders/coders_fits_la-fits.lo
  CC     coders/coders_gif_la-gif.lo
  CC     coders/coders_gradient_la-gradient.lo
  CC     coders/coders_gray_la-gray.lo
  CC     coders/coders_hald_la-hald.lo
  CC     coders/coders_hdr_la-hdr.lo
  CC     coders/coders_histogram_la-histogram.lo
  CC     coders/coders_hrz_la-hrz.lo
  CC     coders/coders_html_la-html.lo
  CC     coders/coders_icon_la-icon.lo
  CC     coders/coders_inline_la-inline.lo
  CC     coders/coders_info_la-info.lo
  CC     coders/coders_ipl_la-ipl.lo
  CC     coders/coders_label_la-label.lo
  CC     coders/coders_mac_la-mac.lo
  CC     coders/coders_magick_la-magick.lo
  CC     coders/coders_map_la-map.lo
  CC     coders/coders_mat_la-mat.lo
  CC     coders/coders_matte_la-matte.lo
  CC     coders/coders_meta_la-meta.lo
  CC     coders/coders_miff_la-miff.lo
  CC     coders/coders_mono_la-mono.lo
  CC     coders/coders_mpc_la-mpc.lo
  CC     coders/coders_mpeg_la-mpeg.lo
  CC     coders/coders_mpr_la-mpr.lo
  CC     coders/coders_msl_la-msl.lo
  CC     coders/coders_mtv_la-mtv.lo
  CC     coders/coders_mvg_la-mvg.lo
  CC     coders/coders_null_la-null.lo
  CC     coders/coders_otb_la-otb.lo
  CC     coders/coders_palm_la-palm.lo
  CC     coders/coders_pango_la-pango.lo
  CC     coders/coders_pattern_la-pattern.lo
  CC     coders/coders_pcd_la-pcd.lo
  CC     coders/coders_pcl_la-pcl.lo
  CC     coders/coders_pcx_la-pcx.lo
  CC     coders/coders_pdb_la-pdb.lo
  CC     coders/coders_pdf_la-pdf.lo
  CC     coders/coders_pes_la-pes.lo
  CC     coders/coders_pict_la-pict.lo
  CC     coders/coders_pix_la-pix.lo
  CC     coders/coders_plasma_la-plasma.lo
  CC     coders/coders_pnm_la-pnm.lo
  CC     coders/coders_preview_la-preview.lo
  CC     coders/coders_ps_la-ps.lo
  CC     coders/coders_ps2_la-ps2.lo
  CC     coders/coders_ps3_la-ps3.lo
  CC     coders/coders_psd_la-psd.lo
  CC     coders/coders_pwp_la-pwp.lo
  CC     coders/coders_raw_la-raw.lo
  CC     coders/coders_rgb_la-rgb.lo
  CC     coders/coders_rla_la-rla.lo
  CC     coders/coders_rle_la-rle.lo
  CC     coders/coders_scr_la-scr.lo
  CC     coders/coders_sct_la-sct.lo
  CC     coders/coders_sfw_la-sfw.lo
  CC     coders/coders_sgi_la-sgi.lo
  CC     coders/coders_stegano_la-stegano.lo
  CC     coders/coders_sun_la-sun.lo
  CC     coders/coders_svg_la-svg.lo
  CC     wand/wand_libMagickWand_la-animate.lo
coders/svg.c:93:10: fatal error: 'librsvg/rsvg.h' file not found
#include "librsvg/rsvg.h"
         ^
  CC     wand/wand_libMagickWand_la-compare.lo
1 error generated.
make[1]: *** [coders/coders_svg_la-svg.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2
config.log was copied to /Users/dries/Library/Logs/Homebrew
==> Build Environment
HOMEBREW_VERSION: 0.9.2
HEAD: 20ad5702c5bdb89e7a52c0b7407d58dbbf6a9afd
CPU: quad-core 64-bit arrandale
OS X: 10.8-x86_64
Xcode: 4.4
CLT: 4.4.0.0.1.1249367152
X11: 2.7.2 @ /opt/X11
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
CPPFLAGS: -I/usr/local/Cellar/gettext/0.18.1.1/include -isystem /usr/local/include -I/opt/X11/include
CMAKE_PREFIX_PATH: /opt/X11:/opt/X11
LDFLAGS: -L/usr/local/Cellar/gettext/0.18.1.1/lib -L/usr/local/lib -L/opt/X11/lib
MACOSX_DEPLOYMENT_TARGET: 10.8
MAKEFLAGS: -j4
PKG_CONFIG_PATH: /opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Library/Homebrew/pkgconfig
Error: Failed executing: make install (imagemagick.rb:137)
These existing issues may help you:
    https://github.com/mxcl/homebrew/issues/13618
    https://github.com/mxcl/homebrew/issues/13638
Otherwise, this may help you fix or report the issue:
    https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist

目前,我已经没有可以采取的措施了。有人知道这个安装有什么问题吗?

4

3 回答 3

8

我为此浪费了很多时间。最后我按照这个网站上的说明做了:

http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion

而且(似乎为我解决了这个问题的东西)正在运行brew doctor并修复每一个问题,直到它不再抱怨为止。现在我已经安装了 imagemagick。希望能帮助到你。

于 2012-08-01T17:22:03.353 回答
2

是的我也遇到了这个问题,我认为make是冲突的原因。

在安装之前,我使用brew doctor检查环境,它显示我以下错误:

Your compilers are different from the standard versions for your Xcode.
If you have Xcode 4.3 or newer, you should install the Command Line Tools for
Xcode from within Xcode's Download preferences.
Otherwise, you should reinstall Xcode.

如果先安装Xcode-4.4,再安装osx-GCC-4.2,就会出现这个错误。

我尝试重新安装 Xcode-4.4,但它不起作用。所以我只是直接从源代码安装编译器。

然后 ImageMagick 工作。但这可能会导致文件存储位置有问题,使用brew doctor检查时会产生一些警告。


最近我尝试重置 xcode-path 以解决版本冲突

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

我认为这可能是解决make冲突的一种方式。

于 2012-08-07T12:09:31.977 回答
0

如果有人在使用 macports 而不是 homebrew,则可以使用以下命令安装 ImageMagick(在安装 Xcode 和命令行工具之后):

sudo port install ImageMagick
于 2013-01-16T22:04:41.867 回答