2013-03-01 2 views
3

Я пытаюсь работать над своей галереей, и мне нужно установить rmagick. Однако я не смог это сделать, так как получаю сообщение об ошибке с отказом в создании собственного расширения gem. Я вижу другие публикации, но их ошибки отличаются от мин.Rmagick не удалось создать gem native на OSX Lion

Я не уверен, как заставить его работать. Если кто-то знает исправление, которое будет очень полезно!

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     /Users/lexi87/.rvm/rubies/ruby-1.9.3-p385/bin/ruby extconf.rb 
checking for Ruby version >= 1.8.5... yes 
checking for /usr/local/bin/gcc-4.2... yes 
checking for Magick-config... yes 
checking for ImageMagick version >= 6.4.9... yes 
checking for HDRI disabled version of ImageMagick... yes 
checking for stdint.h... yes 
checking for sys/types.h... yes 
checking for wand/MagickWand.h... yes 
checking for snprintf() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for AcquireImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for AffinityImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for AffinityImages() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for AutoGammaImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for AutoLevelImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for BlueShiftImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for ConstituteComponentTerminus() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for DeskewImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for EncipherImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for EqualizeImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for FloodfillPaintImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for FunctionImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for GetAuthenticIndexQueue() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for GetAuthenticPixels() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for GetImageAlphaChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for GetVirtualPixels() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for LevelImageColors() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for LevelColorsImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for LevelizeImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for LiquidRescaleImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for MagickLibAddendum() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for OpaquePaintImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for QueueAuthenticPixels() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for RemapImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for RemoveImageArtifact() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for SelectiveBlurImageChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for SetImageAlphaChannel() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for SetImageArtifact() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for SetMagickMemoryMethods() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for SparseColorImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for SyncAuthenticPixels() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for TransformImageColorspace() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for TransparentPaintImage() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for TransparentPaintImageChroma() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for QueryMagickColorname() new signature... yes 
checking for Image.type in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for DrawInfo.kerning in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for DrawInfo.interline_spacing in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for DrawInfo.interword_spacing in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for DitherMethod in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for MagickFunction in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for ImageLayerMethod in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for long double in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,stdint.h,sys/types.h,wand/MagickWand.h... yes 
checking for AlphaChannelType.CopyAlphaChannel... yes 
checking for AlphaChannelType.BackgroundAlphaChannel... yes 
checking for CompositeOperator.BlurCompositeOp... yes 
checking for CompositeOperator.DistortCompositeOp... yes 
checking for CompositeOperator.LinearBurnCompositeOp... yes 
checking for CompositeOperator.LinearDodgeCompositeOp... yes 
checking for CompositeOperator.MathematicsCompositeOp... yes 
checking for CompositeOperator.PegtopLightCompositeOp... yes 
checking for CompositeOperator.PinLightCompositeOp... yes 
checking for CompositeOperator.VividLightCompositeOp... yes 
checking for CompressionType.DXT1Compression... yes 
checking for CompressionType.DXT3Compression... yes 
checking for CompressionType.DXT5Compression... yes 
checking for CompressionType.ZipSCompression... yes 
checking for CompressionType.PizCompression... yes 
checking for CompressionType.Pxr24Compression... yes 
checking for CompressionType.B44Compression... yes 
checking for CompressionType.B44ACompression... yes 
checking for DistortImageMethod.BarrelDistortion... yes 
checking for DistortImageMethod.BarrelInverseDistortion... yes 
checking for DistortImageMethod.BilinearForwardDistortion... yes 
checking for DistortImageMethod.BilinearReverseDistortion... yes 
checking for DistortImageMethod.DePolarDistortion... yes 
checking for DistortImageMethod.PolarDistortion... yes 
checking for DistortImageMethod.PolynomialDistortion... yes 
checking for DistortImageMethod.ShepardsDistortion... yes 
checking for DitherMethod.NoDitherMethod... yes 
checking for FilterTypes.KaiserFilter... yes 
checking for FilterTypes.WelshFilter... yes 
checking for FilterTypes.ParzenFilter... yes 
checking for FilterTypes.LagrangeFilter... yes 
checking for FilterTypes.BohmanFilter... yes 
checking for FilterTypes.BartlettFilter... yes 
checking for FilterTypes.SentinelFilter... yes 
checking for MagickEvaluateOperator.PowEvaluateOperator... yes 
checking for MagickEvaluateOperator.LogEvaluateOperator... yes 
checking for MagickEvaluateOperator.ThresholdEvaluateOperator... yes 
checking for MagickEvaluateOperator.ThresholdBlackEvaluateOperator... yes 
checking for MagickEvaluateOperator.ThresholdWhiteEvaluateOperator... yes 
checking for MagickEvaluateOperator.GaussianNoiseEvaluateOperator... yes 
checking for MagickEvaluateOperator.ImpulseNoiseEvaluateOperator... yes 
checking for MagickEvaluateOperator.LaplacianNoiseEvaluateOperator... yes 
checking for MagickEvaluateOperator.MultiplicativeNoiseEvaluateOperator... yes 
checking for MagickEvaluateOperator.PoissonNoiseEvaluateOperator... yes 
checking for MagickEvaluateOperator.UniformNoiseEvaluateOperator... yes 
checking for MagickEvaluateOperator.CosineEvaluateOperator... yes 
checking for MagickEvaluateOperator.SineEvaluateOperator... yes 
checking for MagickEvaluateOperator.AddModulusEvaluateOperator... yes 
checking for MagickFunction.ArcsinFunction... yes 
checking for MagickFunction.ArctanFunction... yes 
checking for MagickFunction.PolynomialFunction... yes 
checking for MagickFunction.SinusoidFunction... yes 
checking for ImageLayerMethod.FlattenLayer... yes 
checking for ImageLayerMethod.MergeLayer... yes 
checking for ImageLayerMethod.MosaicLayer... yes 
checking for ImageLayerMethod.TrimBoundsLayer... yes 
checking for VirtualPixelMethod.HorizontalTileVirtualPixelMethod... yes 
checking for VirtualPixelMethod.VerticalTileVirtualPixelMethod... yes 
checking for VirtualPixelMethod.HorizontalTileEdgeVirtualPixelMethod... yes 
checking for VirtualPixelMethod.VerticalTileEdgeVirtualPixelMethod... yes 
checking for VirtualPixelMethod.CheckerTileVirtualPixelMethod... yes 
checking for ruby/io.h... yes 
checking for rb_frame_this_func() in ruby.h,ruby/io.h... yes 
creating extconf.h 
creating Makefile 


====================================================================== 
Thu 28Feb13 20:39:13 
This installation of RMagick 2.13.2 is configured for 
Ruby 1.9.3 (x86_64-darwin12.2.0) and ImageMagick 6.8.0 Q16 
====================================================================== 



make 
compiling rmagick.c 
compiling rmdraw.c 
compiling rmenum.c 
compiling rmfill.c 
compiling rmilist.c 
rmilist.c: In function ‘ImageList_map’: 
rmilist.c:448: warning: ‘MapImages’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/magick/deprecate.h:200) 
compiling rmimage.c 
rmimage.c: In function ‘Image_map’: 
rmimage.c:8159: warning: ‘MapImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/magick/deprecate.h:198) 
rmimage.c: In function ‘Image_recolor’: 
rmimage.c:10705: warning: ‘RecolorImage’ is deprecated (declared at /usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/magick/deprecate.h:140) 
compiling rminfo.c 
compiling rmmain.c 
compiling rmmontage.c 
compiling rmpixel.c 
compiling rmstruct.c 
compiling rmutil.c 
rmutil.c: In function ‘rm_fatal_error_handler’: 
rmutil.c:1612: warning: format not a string literal and no format arguments 
rmutil.c: In function ‘handle_exception’: 
rmutil.c:1652: warning: format not a string literal and no format arguments 
linking shared-object RMagick2.bundle 
ld: file not found: /usr/local/lib/libltdl.7.dylib for architecture x86_64 
collect2: ld returned 1 exit status 
make: *** [RMagick2.bundle] Error 1 


Gem files will remain installed in /Users/lexi87/.rvm/gems/ruby-1.9.3-p385/gems/rmagick-2.13.2 for inspection. 
Results logged to /Users/lexi87/.rvm/gems/ruby-1.9.3-p385/gems/rmagick-2.13.2/ext/RMagick/gem_make.out 
An error occurred while installing rmagick (2.13.2), and Bundler cannot continue. 
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling. 

ответ

2

Чтобы исправить это, мне пришлось удалить, а затем переустановить RVM. Затем запустите «brew install ruby», чтобы получить последнюю версию. Затем «расслоение».

Я надеюсь, что это поможет другим, кто столкнулся с точной ошибкой, которую я сделал.

5

Похоже, вы пропустили общую библиотеку под названием libltdl, которая необходима для строительства камня. Быстрый поиск в Google показывает, что это обеспечивается libtool package.

  1. Попробуйте установить libtool и посмотрите, не устраняет проблему. Если у вас есть Homebrew, это можно сделать с помощью brew install libtool.

  2. По-видимому, существует known issue на Mountain Lion, где предложенное решение заключается в следующем: обновление XCode 4.4, обновление инструментов командной XCode строки, установите XQuartz (вероятно, для этого не требуется), и, наконец:

    brew uninstall imagemagick 
    brew install --fresh imagemagick 
    
+0

В нем говорится, что libtool-2.4.2 уже установлен – pwz2000

+0

Существует проблема [https://github.com/mroth/lolcommits/issues/65#issuecomment-7280659] на Mountain Lion, но я не конечно, если это решение поможет вам, так как вы говорите, что находитесь на льве. – adamdunson

+0

Кроме того, ваш журнал создания показывает, что он ищет 'libltdl' в каталоге'/usr/local/lib', но я предполагаю, что там ничего нет? – adamdunson

3

Недостающая библиотека предоставляется пакетом libtool. Вы можете установить с помощью заваривать:

заварить Instal Libtool

После установки вы получите это сообщение:

Xcode 4.2 и ниже, обеспечивают glibtool.

Как правило, для вас нет последствий для этого. Если вы строите свое собственное программное обеспечение, и это требует этой формулы, вам нужно добавить к вашим сборке переменным:

LDFLAGS: -L/usr/local/opt/libtool/lib 
CPPFLAGS: -I/usr/local/opt/libtool/include 

Добавьте эти переменные среды для текущей среды:

export LDFLAGS="-L/usr/local/opt/libtool/lib" 
export CPPFLAGS="-I/usr/local/opt/libtool/include" 

И затем установите rmagick gem снова. Я также обновил инструменты командной строки XCode до последней версии.

Смежные вопросы