MYSYS2 環境 に nokogiri がインスールできず、困っています。
Could not create Makefile due to some reason
とエラーが出ていますので、makefile の作成がなんらかの原因で出来ていないようですが、原因がわかりません。
$ gem install nokogiri Building native extensions. This could take a while... ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. current directory: /home/myname/.gem/ruby/2.3.0/gems/nokogiri-1.6.8.1/ext/nokogiri /usr/bin/ruby.exe -r ./siteconf20161021-4212-968nrq.rb extconf.rb checking if the C compiler accepts ... *** 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 --without-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=/usr/bin/$(RUBY_BASE_NAME) --help --clean /usr/lib/ruby/2.3.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/2.3.0/mkmf.rb:572:in `block in try_compile' from /usr/lib/ruby/2.3.0/mkmf.rb:523:in `with_werror' from /usr/lib/ruby/2.3.0/mkmf.rb:572:in `try_compile' from extconf.rb:139:in `nokogiri_try_compile' from extconf.rb:163:in `block in add_cflags' from /usr/lib/ruby/2.3.0/mkmf.rb:630:in `with_cflags' from extconf.rb:162:in `add_cflags' from extconf.rb:415:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: /home/myname/.gem/ruby/2.3.0/extensions/x86_64-unknown/2.3.0/nokogiri-1.6.8.1/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /home/myname/.gem/ruby/2.3.0/gems/nokogiri-1.6.8.1 for inspection. Results logged to /home/myname/.gem/ruby/2.3.0/extensions/x86_64-unknown/2.3.0/nokogiri-1.6.8.1/gem_make.out
※ruby 2.3 では nokogiri をインストール出来ないという情報をネット上では見かけますが、、 $ ruby -v ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-msys]
gem でインストール出来るような気もしています $ gem list --remote nokogiri *** REMOTE GEMS *** backupify-rsolr-nokogiri (0.12.1.1) epp-nokogiri (1.0.1) glebm-nokogiri (1.4.2.1) jwagener-nokogiri (1.4.1) nokogiri (1.6.8.1 ruby java x64-mingw32 x86-mingw32, 1.6.1 x86-mswin32-60, 1.4.4.1 x86-mswin32) nokogiri-cache (1.0.0) nokogiri-diff (0.2.0) nokogiri-fitzsimmons (1.5.5.3 ruby java) nokogiri-happymapper (0.5.9) nokogiri-happymapper-deiga (0.5.10) nokogiri-maglev- (1.5.5.20120817130721) nokogiri-maven (1.5.0 java) nokogiri-plist (0.5.0) nokogiri-pretty (0.1.0) nokogiri-streaming-reader (0.0.4) nokogiri-styles (0.1.2) nokogiri-xml-range (0.1.0) nokogiri-xmlsec (0.0.4) nokogiri-xmlsec-me-harder (0.9.2) nokogiri-xmlsec1 (0.0.11) nokogiri_bang_finders (1.1.0) nokogiri_helper (0.0.1) nokogiri_html_helpers (0.1.4) nokogiri_truncate_html (0.0.4) rack-nokogiri (0.1.0) ratom-nokogiri (0.10.4) revo-nokogiri (1.4.1 java) rsolr-nokogiri (0.0.0) rss-nokogiri (0.0.1.1) rubyjedi-nokogiri_java (1.4.0.20100513161003 java) sax-machine-nokogiri-1.4.4-safe (0.0.15) schematron-nokogiri (0.0.1) spp_nokogiri_ext (0.0.5) superfeedr-nokogiri (1.4.0.20091116183308) tag_remover_nokogiri (0.0.2) tenderlove-nokogiri (0.0.0.20081001111445, 0.0.0 x86-mswin32-60) unobtainium-nokogiri (0.1.2) watir-nokogiri (1.0.0)
尚、ruby 2.2 の環境で `gem install nokogiri` を試してみたいのですが、 `rbenv` でもエラーとなり、試せていません。 $ rbenv install 2.2.2 Downloading ruby-2.2.2.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2 Installing ruby-2.2.2... BUILD FAILED (MSYS_NT-6.1 2.5.2(0.297/5/3) using ruby-build 20160913-13-g8ef0c34) Inspect or clean up the working tree at /tmp/ruby-build.20161021084522.6968 Results logged to /tmp/ruby-build.20161021084522.6968.log Last 10 log lines: ^ file.c: 関数 'rb_file_expand_path_internal' 内: file.c:3542:6: 警告: 関数 'cygwin_conv_to_win32_path' の暗黙的な宣言です [-Wimplicit-function-declaration] if (cygwin_conv_to_win32_path(path, w32buf) == 0) { ^ file.c:3548:6: 警告: 関数 'strlcat' の暗黙的な宣言です [-Wimplicit-function-declaration] strlcat(w32buf, p, bufsize); ^ make: *** [Makefile:363: file.o] エラー 1 make: *** 未完了のジョブを待っています....
解決の手がかりになる情報をご教示いただければ大変助かります。
宜しくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/26 01:26
2016/10/26 13:58 編集
2017/03/09 09:27 編集