2012-10-13 5 views
4

OSX에서 Visual Ruby를 설치하려고합니다. VisualRuby.net에 대한 가이드에 이어 다음과 같이했습니다. 다음OSX에서 Visual Ruby를 설치하는 중 오류가 발생했습니다.

brew install gtk+ 

: 마지막

brew install gtksourceview 

하고 :

다음 오류 메시지를 산출
sudo gem install visualruby 

. 나는 무엇이 잘못되었는지 전혀 모릅니다. 어떤 생각입니까?

Building native extensions. This could take a while... 
ERROR: Error installing visualruby: 
    ERROR: Failed to build gem native extension. 

     /Users/ma/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
checking for -Wall option to compiler... yes 
checking for -Waggregate-return option to compiler... yes 
checking for -Wcast-align option to compiler... yes 
checking for -Wextra option to compiler... yes 
checking for -Wformat=2 option to compiler... yes 
checking for -Winit-self option to compiler... yes 
checking for -Wlarger-than-65500 option to compiler... yes 
checking for -Wmissing-declarations option to compiler... yes 
checking for -Wmissing-format-attribute option to compiler... yes 
checking for -Wmissing-include-dirs option to compiler... yes 
checking for -Wmissing-noreturn option to compiler... yes 
checking for -Wmissing-prototypes option to compiler... yes 
checking for -Wnested-externs option to compiler... yes 
checking for -Wold-style-definition option to compiler... yes 
checking for -Wpacked option to compiler... yes 
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes 
checking for -Wpointer-arith option to compiler... yes 
checking for -Wswitch-default option to compiler... yes 
checking for -Wswitch-enum option to compiler... yes 
checking for -Wundef option to compiler... yes 
checking for -Wunsafe-loop-optimizations option to compiler... yes 
checking for -Wwrite-strings option to compiler... yes 
checking for rb_define_alloc_func() in ruby.h... yes 
checking for rb_block_proc() in ruby.h... yes 
checking for new allocation framework... yes 
checking for attribute assignment... no 
checking for cairo... yes 
checking for rb_cairo.h... yes 
checking for Win32 OS... no 
checking for gtksourceview-2.0... yes 
*** 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=/Users/ma/.rvm/rubies/ruby-1.9.3-p194/bin/ruby 
    --with-pkg-config 
    --without-pkg-config 
    --with-override-variables 
    --without-override-variables 
/Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:239:in `parse_pc': .pc for libxml-2.0 doesn't exist. (RuntimeError) 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:181:in `declaration' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:130:in `requires_private' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:311:in `all_required_packages' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:195:in `collect_cflags' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:134:in `cflags' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:196:in `block in collect_cflags' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:195:in `collect' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:195:in `collect_cflags' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:134:in `cflags' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:364:in `cflags' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/pkg-config-1.1.4/lib/pkg-config.rb:415:in `have_package' 
    from /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/glib2-1.1.5/lib/mkmf-gnome2.rb:540:in `required_pkg_config_package' 
    from extconf.rb:58:in `<main>' 


Gem files will remain installed in /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/gtksourceview2-1.1.5 for inspection. 
Results logged to /Users/ma/.rvm/gems/ruby-1.9.3-p194/gems/gtksourceview2-1.1.5/ext/gtksourceview2/gem_make.out 

답변

7

당신이 산 사자를 실행하는 경우이 bug가 발생할 수 있습니다 brew update을보십시오.

5

동일한 문제가 발생했습니다. Mountain Lion에 libxml-2.0.pc 파일이 /usr/lib/pkgconfig에 누락 된 것으로 나타났습니다 (here). libxml2이 설치되었는지 확인한 후

는 :

brew install libxml2 

나는 나를 VisualRuby를 설치할 수 제안 심볼릭 링크를 만들었습니다.

sudo ln -s /usr/local/Cellar/libxml2/2.9.0/lib/pkgconfig/libxml-2.0.pc /usr/lib/pkgconfig 
+0

를 해결했다. 나는 버전 번호를'2.9.0'에서'2.9.1'까지 늘려야 만했습니다 : 'sudo ln -s /usr/local/Cellar/libxml2/2.9.1/lib/pkgconfig/libxml-2.0.pc/usr/lib/pkgconfig' – Synoli

+0

필자는 비슷한 문제가 있었는데 실제로 libpng16.pc를/usr/lib/pkgconfig에 복사해야했지만이 일반적인 조언은 도움이되었습니다. – Julian

+0

고맙습니다 - mac osx에서'gobject-introspection' 설치와 관련된 별도의 문제가 있었지만 유사한 simlink가 도움이되었습니다. – lfender6445

2

엘 캐피 탄에서 설치하는 동안이 문제가 발생했습니다. 제안 된 솔루션을 사용하여 링크를 만들 수 없어 OS가 변경 사항을 차단했습니다. 나는이 링크를 고정

brew link libxml2 --force 

을 사용 문제이 작동

관련 문제