how to resolve nokogiri 1.6.5 compile error

Posted by nopsled
2015.01.24 08:51 운영체제

Building native extensions with: '--use-system-libraries'
This could take a while...
ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb --use-system-libraries
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... yes
Building nokogiri using system libraries.
libxml2 version 2.6.21 or later is required!
*** 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:

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.5 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/nokogiri-1.6.5/gem_make.out

OS X에서 metasploit을 사용하려는데 bundle install을 해주라길래 해줬는데 자꾸 에러를 내뱉어서 찾아본 방법이다.

결과는 xcode를 전에 지웠었는데.. 다시 설치해주고 xcode에 저장된 library(libxml2)를 사용하면 되는 것이었다..

gem install nokogiri -v '1.6.5' -- --use-system-libraries=true --with-xml2-include=/Applications/
그러므로 이렇게 해주면 정상적으로 설치 완료.. 고생이 많았다..ㅠ

'운영체제' 카테고리의 다른 글

ssh process continuation  (0) 2015.10.10
/usr/bin/dpkg returned an error code (1) in ubuntu  (0) 2015.08.18
how to resolve nokogiri 1.6.5 compile error  (0) 2015.01.24
metasploit on mac  (0) 2015.01.23
CleanMyMac2.dmg crack.  (0) 2014.05.13
boom.dmg crack  (0) 2014.05.13
이 댓글을 비밀 댓글로