실수로 일부 라이브러리를 삭제했습니다 (필자는 생각하지 않습니다). 이제는 필요한 nokogiri 버전을 설치할 수 없습니다. 비슷한 문제가있는 다른 게시물을 읽었으며 해결책이 도움이되지 않습니다. 이 ?? 수번들 설치 특정 nokogiri -v '1.6.1'문제
수있는 세계에서 어떤 등의 라이브러리와 함께 설치 시도, 다음과 같은 오류 :(Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /private/var/folders/_w/_81xdz4n1x5_9kd3xxtqlv3w0000gn/T/bundler20161219-83285-1fnegt2nokogiri-1.6.1/gems/nokogiri-1.6.1/ext/nokogiri
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20161219-83285-voqu1e.rb extconf.rb --use-system-libraries
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin16.3.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /private/var/folders/_w/_81xdz4n1x5_9kd3xxtqlv3w0000gn/T/bundler20161219-83285-1fnegt2nokogiri-1.6.1/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin16.3.0/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin16.3.0/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
Running 'compile' for libxslt 1.1.26... OK
Running 'install' for libxslt 1.1.26... OK
Activating libxslt 1.1.26 (from /private/var/folders/_w/_81xdz4n1x5_9kd3xxtqlv3w0000gn/T/bundler20161219-83285-1fnegt2nokogiri-1.6.1/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin16.3.0/libxslt/1.1.26)...
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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.
다음
내가 양조 설치의 libxml2를 시도했습니다
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/folders/_w/_81xdz4n1x5_9kd3xxtqlv3w0000gn/T/bundler20161219-83285-1fnegt2nokogiri-1.6.1/extensions/universal-darwin-16/2.0.0/nokogiri-1.6.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/folders/_w/_81xdz4n1x5_9kd3xxtqlv3w0000gn/T/bundler20161219-83285-1fnegt2nokogiri-1.6.1/gems/nokogiri-1.6.1 for inspection.
Results logged to /var/folders/_w/_81xdz4n1x5_9kd3xxtqlv3w0000gn/T/bundler20161219-83285-1fnegt2nokogiri-1.6.1/extensions/universal-darwin-16/2.0.0/nokogiri-1.6.1/gem_make.out
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling.
몇 가지 설정 옵션을 참조하십시오
노코 기리와 그 의존성을 얻는 것이 지루할 수 있습니다. 처음에, 당신의 OS를 알려주십시오. – mlabarca
예를 들어, 저는 Mac에서 el capitan을 사용하여 시스템 라이브러리를 설치하기 위해 blu install libxml2 libxslt'을 실행해야했습니다. 그런 다음 bundler를 사용하여'bundle config build.nokogiri - -use-system-libraries = true --with-xml2-include =/응용 프로그램/Xcode.app/내용/개발자/플랫폼/MacOSX.platform/개발자/SDKs/MacOSX10.11.sdk/usr/include/libxml2' 자세한 정보는 http://www.nokogiri.org/tutorials/installing_nokogiri.html을 참조하십시오. – mlabarca