2

I'm trying to install nokogumbo in my project using 'gem install nokogumbo' or 'bundle install' but i always get this error

Installing nokogumbo 2.0.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/rafaelpolonio/.rvm/gems/ruby-2.7.6/gems/nokogumbo-2.0.5/ext/nokogumbo
/Users/rafaelpolonio/.rvm/rubies/ruby-2.7.6/bin/ruby -I
/Users/rafaelpolonio/.rvm/rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0 extconf.rb
checking for whether
-I/Users/rafaelpolonio/.rvm/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.9-arm64-darwin/ext/nokogiri
is accepted as CFLAGS... yes
checking for whether
-I/Users/rafaelpolonio/.rvm/rubies/ruby-2.7.6/lib/ruby/gems/2.7.0/gems/nokogiri-1.13.9-arm64-darwin/ext/nokogiri/include
is accepted as CFLAGS... yes
checking for whether
1 warning generated.
compiling ./../../gumbo-parser/src/tag.c
compiling ./../../gumbo-parser/src/parser.c
./../../gumbo-parser/src/parser.c:540:10: warning: cast to smaller integer type
'GumboInsertionMode' from 'void *' [-Wvoid-pointer-to-enum-cast]
  return (GumboInsertionMode) modes->data[(modes->length - 1)];
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
linking shared-object nokogumbo/nokogumbo.bundle
Undefined symbols for architecture arm64:
  "_Nokogiri_wrap_xml_document", referenced from:
      _parse_continue in nokogumbo.o
  "_cNokogiriXmlSyntaxError", referenced from:
      _add_errors in nokogumbo.o
  "_htmlNewDocNoDtD", referenced from:
      _parse_continue in nokogumbo.o
  "_mNokogiri", referenced from:
      _Init_nokogumbo in nokogumbo.o
  "_xmlAddChild", referenced from:
      _build_tree in nokogumbo.o
  "_xmlCreateIntSubset", referenced from:
      _parse_continue in nokogumbo.o
  "_xmlFreeDoc", referenced from:
      _parse_cleanup in nokogumbo.o
  "_xmlNewCDataBlock", referenced from:
      _build_tree in nokogumbo.o
  "_xmlNewDocComment", referenced from:
      _build_tree in nokogumbo.o
  "_xmlNewDocNode", referenced from:
      _build_tree in nokogumbo.o
  "_xmlNewDocText", referenced from:
      _build_tree in nokogumbo.o
  "_xmlNewNs", referenced from:
      _build_tree in nokogumbo.o
  "_xmlNewNsProp", referenced from:
      _build_tree in nokogumbo.o
  "_xmlSearchNs", referenced from:
      _build_tree in nokogumbo.o
  "_xmlSetNs", referenced from:
      _build_tree in nokogumbo.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nokogumbo.bundle] Error 1

My nokogiri is 1.10.0 in my Gemfile.lock

I already tried to install in different ways, upgrate the nokogiri to 1.13.9

How can I solve this problem?

polonio
  • 333
  • 3
  • 11

0 Answers0