2011-07-28 9 views
5

No estoy seguro de si mi problema está relacionado con este hilo (http://stackoverflow.com/questions/6589066/rmagick-and-os-x-lion), pero acabo de actualizado a Lion; más específicamente compré una nueva máquina y migré sobre mi perfil anterior.Actualizar a Lion, no se pudieron construir las extensiones nativas gemelas

No puedo iniciar rails 3 porque no puede encontrar rmagick, y no puedo instalar rmagick, porque me aparece el siguiente error. Intenté desinstalar rmagick y imageMagick, pero sigo teniendo el mismo error cuando intento agrupar la instalación. ¿Alguna idea? Gracias

Installing rmagick (2.13.1) with native extensions /opt/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:551:in `build_extensions': ERROR:  Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

    /opt/local/bin/ruby extconf.rb 
checking for Ruby version >= 1.8.5... yes 
checking for /usr/bin/gcc-4.2... no 
No C compiler found in ${ENV['PATH']}. See mkmf.log for details. 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
--with-opt-dir 
--with-opt-include 
--without-opt-include=${opt-dir}/include 
--with-opt-lib 
--without-opt-lib=${opt-dir}/lib 
--with-make-prog 
--without-make-prog 
--srcdir=. 
--curdir 
--ruby=/opt/local/bin/ruby 


Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection. 
Results logged to /opt/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out 
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:504:in `each' 
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:504:in `build_extensions' 
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:180:in `install' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `install' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `run' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `run' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in `install' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `send' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start' 
from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/bin/bundle:13 
from /opt/local/bin/bundle:19:in `load' 
from /opt/local/bin/bundle:19 

ACTUALIZACIÓN Así que informado a Xcode4 y cuando brew --config todavía indica que me estoy perdiendo cosas GCC:

HOMEBREW_VERSION: 0.8 
HEAD: 8368fe489bde47b8f201bfcfdf328944fdf7092b 
HOMEBREW_PREFIX: /usr/local 
HOMEBREW_CELLAR: /usr/local/Cellar 
HOMEBREW_REPOSITORY: /usr/local 
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew 
Hardware: quad-core 64-bit sandybridge 
OS X: 10.7 
Kernel Architecture: x86_64 
Ruby: 1.8.7-249 
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby 
Xcode: 
GCC-4.0: N/A 
GCC-4.2: N/A 

¿Cómo puede ser esto ??

Respuesta

6

Parece que necesita instalar las herramientas de desarrollo de Unix de Xcode.

Puede instalar las herramientas de Unix al instalar Xcode desde la Mac App Store: http://itunes.apple.com/us/app/xcode/id448457090?mt=12

+0

que espero que tengas razón . Tuve Xcode 3 en realidad, pero actualmente estoy instalando Xcode 4. De hecho, me he encontrado con muchos más problemas desde la publicación original. Muchos problemas si 'brew doctor' y obtengo el siguiente error cuando' brew update' 'fatal: No se puede crear '/usr/local/.git/index.lock': Permiso denegado Error: Fallo al ejecutar: git checkout -q master'. Veamos qué hace Xcode 4 ... –

+0

Sí, Xcode 3 no funciona en Lion. Instale Xcode 4 y luego tendrá que reinstalar Homebrew. –

+0

@Jeff Peterson En realidad, Xcode 3 se ejecuta en Lion, es solo que el instalador no le permite instalarlo. Puede modificar el paquete del instalador e instalarlo (y ejecutarlo) muy bien: http://anatomicwax.tumblr.com/post/7906770311/installing-xcode-3-2-6-on-lion –

0

De las instrucciones de instalación Homebrew en https://github.com/mxcl/homebrew/wiki/Installation

"1 Instalación a través de la App Store sólo funciona para usuarios de león por. otras versiones de Mac OS X, consulte aquí. Si realiza la instalación a través de App Store, deberá ejecutar la aplicación "Instalar Xcode" que se encuentra en/Aplicaciones. "

4

He intentado todo métodos mencionados aquí, nada ayudado. Esto ahorró mi día: https://gist.github.com/3182604

NOTA: 1. Actualización XCode de Preferencias/Descargas 2. Instalar X11.app 3. Y sólo entonces fijar ImageMagick joya

Cuestiones relacionadas