Q&A
前提・実現したいこと
bundle installができません。
サイトに乗っていることはだいたい試したのですが。。。
はあ。。。。
どなたかわかる方いらっしゃいませんでしょうか。。。
発生している問題・エラーメッセージ
vagrant@vagrant:/vagrant/slow$ bundle install --path=vendor/bundle Fetching gem metadata from https://rubygems.org/............. Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Using rake 12.3.2 Using concurrent-ruby 1.1.5 Using i18n 1.6.0 Using minitest 5.11.3 Using thread_safe 0.3.6 Using tzinfo 1.2.5 Using activesupport 5.2.3 Using builder 3.2.3 Using erubi 1.8.0 Using mini_portile2 2.4.0 Fetching nokogiri 1.10.3 Installing nokogiri 1.10.3 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/ext/nokogiri /home/vagrant/.rbenv/versions/2.5.2/bin/ruby -I /home/vagrant/.rbenv/versions/2.5.2/lib/ruby/site_ruby/2.5.0 -r ./siteconf20190425-12443-1jrkrji.rb extconf.rb --use-system-libraries\ --with-xml2-include checking if the C compiler accepts ... yes Building nokogiri using packaged libraries. Using mini_portile version 2.4.0 checking for gzdopen() in -lz... yes checking for iconv... yes ************************************************************************ IMPORTANT NOTICE: Building Nokogiri with a packaged version of libxml2-2.9.9 with the following patches applied: - 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch - 0002-Remove-script-macro-support.patch - 0003-Update-entities-to-remove-handling-of-ssi.patch Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install Note, however, that nokogiri is not fully compatible with arbitrary versions of libxml2 provided by OS/package vendors. ************************************************************************ Extracting libxml2-2.9.9.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.9... OK Running git apply with /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK Running git apply with /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/patches/libxml2/0002-Remove-script-macro-support.patch... OK Running git apply with /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch... OK Running 'configure' for libxml2 2.9.9... OK Running 'compile' for libxml2 2.9.9... OK Running 'install' for libxml2 2.9.9... OK Activating libxml2 2.9.9 (from /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/ports/x86_64-pc-linux-gnu/libxml2/2.9.9)... ************************************************************************ IMPORTANT NOTICE: Building Nokogiri with a packaged version of libxslt-1.1.33 with the following patches applied: - 0001-Fix-security-framework-bypass.patch Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install ************************************************************************ Extracting libxslt-1.1.33.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxslt/1.1.33... OK Running git apply with /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/patches/libxslt/0001-Fix-security-framework-bypass.patch... OK Running 'configure' for libxslt 1.1.33... OK Running 'compile' for libxslt 1.1.33... OK Running 'install' for libxslt 1.1.33... OK Activating libxslt 1.1.33 (from /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/ports/x86_64-pc-linux-gnu/libxslt/1.1.33)... checking for -llzma... yes checking for xmlParseDoc() in libxml/parser.h... yes checking for xsltParseStylesheetDoc() in libxslt/xslt.h... yes checking for exsltFuncRegister() in libexslt/exslt.h... yes checking for xmlHasFeature()... yes checking for xmlFirstElementChild()... yes checking for xmlRelaxNGSetParserStructuredErrors()... yes checking for xmlRelaxNGSetParserStructuredErrors()... yes checking for xmlRelaxNGSetValidStructuredErrors()... yes checking for xmlSchemaSetValidStructuredErrors()... yes checking for xmlSchemaSetParserStructuredErrors()... yes creating Makefile current directory: /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/ext/nokogiri make "DESTDIR=" clean current directory: /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/ext/nokogiri make "DESTDIR=" compiling html_document.c compiling html_element_description.c compiling html_entity_lookup.c compiling html_sax_parser_context.c compiling html_sax_push_parser.c compiling nokogiri.c compiling xml_attr.c compiling xml_attribute_decl.c compiling xml_cdata.c compiling xml_comment.c compiling xml_document.c compiling xml_document_fragment.c compiling xml_dtd.c compiling xml_element_content.c compiling xml_element_decl.c compiling xml_encoding_handler.c compiling xml_entity_decl.c compiling xml_entity_reference.c compiling xml_io.c compiling xml_libxml2_hacks.c compiling xml_namespace.c compiling xml_node.c xml_node.c: In function ‘reparent_node_with’: xml_node.c:304:15: warning: passing argument 1 of ‘xmlFree’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] xmlFree(reparentee->ns->prefix); ^ xml_node.c:304:15: note: expected ‘void *’ but argument is of type ‘const xmlChar * {aka const unsigned char *}’ xml_node.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-tautological-compare’ compiling xml_node_set.c compiling xml_processing_instruction.c compiling xml_reader.c compiling xml_relax_ng.c compiling xml_sax_parser.c compiling xml_sax_parser_context.c compiling xml_sax_push_parser.c compiling xml_schema.c compiling xml_syntax_error.c compiling xml_text.c compiling xml_xpath_context.c compiling xslt_stylesheet.c xslt_stylesheet.c:112:13: warning: ‘swallow_superfluous_xml_errors’ defined but not used [-Wunused-function] static void swallow_superfluous_xml_errors(void * userdata, xmlErrorPtr error, ...) ^ cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-tautological-compare’ linking shared-object nokogiri/nokogiri.so Cleaning files only used during build. rm -rf /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/ext/nokogiri/tmp/x86_64-pc-linux-gnu/ports rm -rf /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/ports current directory: /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3/ext/nokogiri make "DESTDIR=" install /usr/bin/install -c -m 0755 nokogiri.so ./.gem.20190425-12443-5yudz0/nokogiri /usr/bin/install: setting permissions for ‘./.gem.20190425-12443-5yudz0/nokogiri/nokogiri.so’: Operation not permitted Makefile:187: recipe for target 'install-so' failed make: *** [install-so] Error 1 make install failed, exit code 2 Gem files will remain installed in /vagrant/slow/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.3 for inspection. Results logged to /vagrant/slow/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/nokogiri-1.10.3/gem_make.out An error occurred while installing nokogiri (1.10.3), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.10.3' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: rails was resolved to 5.2.3, which depends on actioncable was resolved to 5.2.3, which depends on actionpack was resolved to 5.2.3, which depends on actionview was resolved to 5.2.3, which depends on rails-dom-testing was resolved to 2.0.3, which depends on nokogiri
試したこと
undlerでビルドオプションを指定する
UbuntuにXML::LibXMLを入れる
nokogiri を嫌いにならないで 〜インストール時のエラーを乗り越えろ〜
補足情報(FW/ツールのバージョンなど)
vagrant@vagrant:/vagrant/slow$ ruby -v
ruby 2.5.2p104 (2018-10-18 revision 65133) [x86_64-linux]
vagrant@vagrant:/vagrant/slow$ bundle -v
Bundler version 2.0.1
vagrant@vagrant:/vagrant/slow$ bundle config
Settings are listed in order of priority. The top value will be used. path Set for your local app (/vagrant/slow/.bundle/config): "vendor/bundle" Set for the current user (/home/vagrant/.bundle/config): "vendor/bundle" build.nokogiri Set for the current user (/home/vagrant/.bundle/config): "--use-system-libraries --with-xml2-include"
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2019/07/29 12:32