简体   繁体   中英

Bundler won't install libxml-ruby (2.3.3) Ubuntu

I'm trying to get set up a Rails app but I can't seem to get bundle install working. It keeps telling me:

An error occurred while installing libxml-ruby (2.3.3), and Bundler cannot continue. Make sure that gem install libxml-ruby -v '2.3.3' succeeds before bundling.

Here is the entire error:

result = rxml_new_cstr(xattr, xencoding);
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_reader.c:4:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_reader.c:859:5: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
     result = rxml_new_cstr(xattr, xencoding);
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_reader.c:4:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
compiling ruby_xml_schema.c
compiling ruby_xml_xpath.c
ruby_xml_xpath.c: In function ‘rxml_xpath_to_value’:
ruby_xml_xpath.c:107:7: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       result = rxml_new_cstr((const char*)xobject->stringval, xctxt->doc->encoding);
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_xpath.c:77:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
compiling ruby_xml_sax2_handler.c
ruby_xml_sax2_handler.c: In function ‘end_element_ns_callback’:
ruby_xml_sax2_handler.c:82:7: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       name = rxml_new_cstr(xprefix, NULL);
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:84:7: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
       rb_str_cat2(name, xlocalname); 
       ^
In file included from /usr/include/ruby-1.9.1/ruby/ruby.h:48:0,
                 from /usr/include/ruby-1.9.1/ruby.h:32,
                 from ruby_libxml.h:6,
                 from ruby_xml_sax2_handler.c:3:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 extern size_t strlen (const char *__s)
               ^
ruby_xml_sax2_handler.c:84:7: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
       rb_str_cat2(name, xlocalname); 
       ^
In file included from /usr/include/ruby-1.9.1/ruby/ruby.h:1383:0,
                 from /usr/include/ruby-1.9.1/ruby.h:32,
                 from ruby_libxml.h:6,
                 from ruby_xml_sax2_handler.c:3:
/usr/include/ruby-1.9.1/ruby/intern.h:709:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rb_str_cat(VALUE, const char*, long);
       ^
ruby_xml_sax2_handler.c:84:7: warning: pointer targets in passing argument 2 of ‘rb_str_cat2’ differ in signedness [-Wpointer-sign]
       rb_str_cat2(name, xlocalname); 
       ^
In file included from /usr/include/ruby-1.9.1/ruby/ruby.h:1383:0,
                 from /usr/include/ruby-1.9.1/ruby.h:32,
                 from ruby_libxml.h:6,
                 from ruby_xml_sax2_handler.c:3:
/usr/include/ruby-1.9.1/ruby/intern.h:710:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rb_str_cat2(VALUE, const char*);
       ^
ruby_xml_sax2_handler.c:88:7: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       name = rxml_new_cstr(xlocalname, NULL);
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:94:14: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
              rxml_new_cstr(xlocalname, NULL),
              ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:95:14: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
              xprefix ? rxml_new_cstr(xprefix, NULL) : Qnil,
              ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:96:14: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
              xURI ? rxml_new_cstr(xURI, NULL) : Qnil);
              ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c: In function ‘start_element_ns_callback’:
ruby_xml_sax2_handler.c:205:7: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       VALUE attrName = rxml_new_cstr(xattributes[i+0], NULL);
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:206:7: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr_len’ differ in signedness [-Wpointer-sign]
       VALUE attrValue = rxml_new_cstr_len(xattributes[i+3], xattributes[i+4] - xattributes[i+3], NULL);
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:12:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr_len(const char* xstr, const int length, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:217:7: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       VALUE nsPrefix = xnamespaces[i+0] ? rxml_new_cstr(xnamespaces[i+0], NULL) : Qnil;
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:218:7: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       VALUE nsURI = xnamespaces[i+1] ? rxml_new_cstr(xnamespaces[i+1], NULL) : Qnil;
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:229:7: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       name = rxml_new_cstr(xprefix, NULL);
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:231:7: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
       rb_str_cat2(name, xlocalname); 
       ^
In file included from /usr/include/ruby-1.9.1/ruby/ruby.h:48:0,
                 from /usr/include/ruby-1.9.1/ruby.h:32,
                 from ruby_libxml.h:6,
                 from ruby_xml_sax2_handler.c:3:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 extern size_t strlen (const char *__s)
               ^
ruby_xml_sax2_handler.c:231:7: warning: pointer targets in passing argument 2 of ‘rb_str_cat’ differ in signedness [-Wpointer-sign]
       rb_str_cat2(name, xlocalname); 
       ^
In file included from /usr/include/ruby-1.9.1/ruby/ruby.h:1383:0,
                 from /usr/include/ruby-1.9.1/ruby.h:32,
                 from ruby_libxml.h:6,
                 from ruby_xml_sax2_handler.c:3:
/usr/include/ruby-1.9.1/ruby/intern.h:709:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rb_str_cat(VALUE, const char*, long);
       ^
ruby_xml_sax2_handler.c:231:7: warning: pointer targets in passing argument 2 of ‘rb_str_cat2’ differ in signedness [-Wpointer-sign]
       rb_str_cat2(name, xlocalname); 
       ^
In file included from /usr/include/ruby-1.9.1/ruby/ruby.h:1383:0,
                 from /usr/include/ruby-1.9.1/ruby.h:32,
                 from ruby_libxml.h:6,
                 from ruby_xml_sax2_handler.c:3:
/usr/include/ruby-1.9.1/ruby/intern.h:710:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rb_str_cat2(VALUE, const char*);
       ^
ruby_xml_sax2_handler.c:235:7: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       name = rxml_new_cstr(xlocalname, NULL);
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:241:14: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
              rxml_new_cstr(xlocalname, NULL),
              ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:243:14: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
              xprefix ? rxml_new_cstr(xprefix, NULL) : Qnil,
              ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_sax2_handler.c:244:14: warning: pointer targets in passing argument 1 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
              xURI ? rxml_new_cstr(xURI, NULL) : Qnil,
              ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_sax2_handler.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
compiling ruby_xml_document.c
ruby_xml_document.c: In function ‘rxml_document_canonicalize’:
ruby_xml_document.c:232:10: warning: unused variable ‘list_in’ [-Wunused-variable]
  VALUE * list_in = NULL;
          ^
ruby_xml_document.c:334:3: warning: passing argument 4 of ‘xmlC14NDocDumpMemory’ from incompatible pointer type [enabled by default]
   );
   ^
In file included from ruby_libxml.h:17:0,
                 from ruby_xml_document.c:52:
/usr/include/libxml2/libxml/c14n.h:76:3: note: expected ‘xmlChar **’ but argument is of type ‘xmlChar * (*)[256]’
   xmlC14NDocDumpMemory (xmlDocPtr doc,
   ^
ruby_xml_document.c:199:7: warning: variable ‘length’ set but not used [-Wunused-but-set-variable]
   int length;
       ^
ruby_xml_document.c: In function ‘rxml_document_root_set’:
ruby_xml_document.c:757:14: warning: variable ‘xroot’ set but not used [-Wunused-but-set-variable]
   xmlNodePtr xroot, xnode;
              ^
ruby_xml_document.c: In function ‘rxml_document_save’:
ruby_xml_document.c:805:13: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
   xencoding = xdoc->encoding;
             ^
compiling ruby_xml_xpath_object.c
ruby_xml_xpath_object.c: In function ‘rxml_xpath_object_string’:
ruby_xml_xpath_object.c:295:3: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
   return rxml_new_cstr((const char*) rxpop->xpop->stringval, rxpop->xdoc->encoding);
   ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_xpath_object.c:1:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
compiling ruby_xml.c
ruby_xml.c: In function ‘rxml_default_tree_indent_string_set’:
ruby_xml.c:612:23: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
   xmlTreeIndentString = xmlStrdup((xmlChar *)StringValuePtr(string));
                       ^
compiling ruby_xml_namespaces.c
compiling ruby_xml_attributes.c
compiling ruby_xml_io.c
compiling ruby_xml_parser_options.c
compiling ruby_xml_html_parser.c
compiling ruby_xml_encoding.c
compiling ruby_xml_relaxng.c
compiling ruby_xml_error.c
compiling ruby_xml_cbg.c
compiling ruby_xml_xinclude.c
compiling ruby_xml_html_parser_context.c
ruby_xml_html_parser_context.c: In function ‘rxml_html_parser_context_options_set’:
ruby_xml_html_parser_context.c:307:7: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
   int result;
       ^
compiling ruby_xml_xpointer.c
compiling ruby_xml_parser_context.c
ruby_xml_parser_context.c: In function ‘rxml_parser_context_document’:
ruby_xml_parser_context.c:53:3: warning: pointer targets in passing argument 4 of ‘xmlDocDumpFormatMemoryEnc’ differ in signedness [-Wpointer-sign]
   xmlDocDumpFormatMemoryEnc(xdoc, &buffer, &length, xdoc->encoding, 0);
   ^
In file included from /usr/include/libxml2/libxml/parser.h:16:0,
                 from ruby_libxml.h:7,
                 from ruby_xml_parser_context.c:3:
/usr/include/libxml2/libxml/tree.h:1162:3: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
   xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
   ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_base_uri_get’:
ruby_xml_parser_context.c:191:5: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
     return rxml_new_cstr(ctxt->input->filename, ctxt->encoding);
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_parser_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
In file included from /usr/include/ruby-1.9.1/ruby.h:32:0,
                 from ruby_libxml.h:6,
                 from ruby_xml_parser_context.c:3:
ruby_xml_parser_context.c: In function ‘rxml_parser_context_base_uri_set’:
/usr/include/ruby-1.9.1/ruby/ruby.h:467:27: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
 #define StringValuePtr(v) rb_string_value_ptr(&(v))
                           ^
ruby_xml_parser_context.c:211:28: note: in expansion of macro ‘StringValuePtr’
     const xmlChar * xurl = StringValuePtr(url);
                            ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_data_directory_get’:
ruby_xml_parser_context.c:252:5: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
     return (rxml_new_cstr(ctxt->directory, ctxt->encoding));
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_parser_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_encoding_get’:
ruby_xml_parser_context.c:356:3: warning: pointer targets in passing argument 1 of ‘xmlParseCharEncoding’ differ in signedness [-Wpointer-sign]
   return INT2NUM(xmlParseCharEncoding(ctxt->encoding));
   ^
In file included from /usr/include/libxml2/libxml/parser.h:810:0,
                 from ruby_libxml.h:7,
                 from ruby_xml_parser_context.c:3:
/usr/include/libxml2/libxml/encoding.h:194:2: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
  xmlParseCharEncoding  (const char *name);
  ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_name_node_get’:
ruby_xml_parser_context.c:510:5: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
     return (rxml_new_cstr((const char*) ctxt->name, ctxt->encoding));
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_parser_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_name_tab_get’:
ruby_xml_parser_context.c:537:7: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       rb_ary_push(tab_ary, rxml_new_cstr((const char*) ctxt->nameTab[i], ctxt->encoding));
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_parser_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_options_set’:
ruby_xml_parser_context.c:629:7: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
   int result;
       ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_subset_name_get’:
ruby_xml_parser_context.c:803:5: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
     return (rxml_new_cstr((const char*) ctxt->intSubName, ctxt->encoding));
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_parser_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_subset_external_uri_get’:
ruby_xml_parser_context.c:822:5: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
     return (rxml_new_cstr((const char*) ctxt->extSubURI, ctxt->encoding));
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_parser_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_subset_external_system_id_get’:
ruby_xml_parser_context.c:841:5: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
     return (rxml_new_cstr((const char*) ctxt->extSubSystem, ctxt->encoding));
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_parser_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_parser_context.c: In function ‘rxml_parser_context_version_get’:
ruby_xml_parser_context.c:926:5: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
     return (rxml_new_cstr((const char*) ctxt->version, ctxt->encoding));
     ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_parser_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
compiling ruby_xml_dtd.c
compiling libxml.c
compiling ruby_xml_sax_parser.c
compiling ruby_xml_input_cbg.c
compiling ruby_xml_xpath_context.c
ruby_xml_xpath_context.c: In function ‘rxml_xpath_context_register_namespaces_from_node’:
ruby_xml_xpath_context.c:162:9: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
         VALUE prefix = rxml_new_cstr((const char*)xns->prefix, xctxt->doc->encoding);
         ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_xpath_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_xpath_context.c:163:9: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
         VALUE uri = rxml_new_cstr((const char*)xns->href, xctxt->doc->encoding);
         ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_xpath_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
ruby_xml_xpath_context.c: In function ‘rxml_xpath_context_register_namespaces’:
ruby_xml_xpath_context.c:218:7: warning: pointer targets in passing argument 2 of ‘rxml_new_cstr’ differ in signedness [-Wpointer-sign]
       ruri = rxml_new_cstr(&cp[1], xctxt->doc->encoding);
       ^
In file included from ruby_libxml.h:43:0,
                 from ruby_xml_xpath_context.c:3:
ruby_xml_encoding.h:11:7: note: expected ‘const char *’ but argument is of type ‘const xmlChar *’
 VALUE rxml_new_cstr(const char* xstr, const char* xencoding);
       ^
compiling ruby_xml_parser.c
compiling ruby_xml_html_parser_options.c
compiling ruby_xml_node.c
ruby_xml_node.c: In function ‘rxml_node_to_s’:
ruby_xml_node.c:622:54: error: dereferencing pointer to incomplete type
     result = rxml_new_cstr((const char*) output->conv->content, xencoding);
                                                      ^
ruby_xml_node.c:624:56: error: dereferencing pointer to incomplete type
     result = rxml_new_cstr((const char*) output->buffer->content, xencoding);
                                                        ^
make: *** [ruby_xml_node.o] Error 1


Gem files will remain installed in /home/aaron/.bundler/tmp/6257/gems/libxml-ruby-2.3.3 for inspection.
Results logged to /home/aaron/.bundler/tmp/6257/gems/libxml-ruby-2.3.3/ext/libxml/gem_make.out
An error occurred while installing libxml-ruby (2.3.3), and Bundler cannot
continue.
Make sure that `gem install libxml-ruby -v '2.3.3'` succeeds before bundling.

Do you have build-essential package installed? if don't:

You have to enable the main repository in the /etc/apt/sources.list file. To accomplish this remove the '#' character in front of the following lines.

#deb http://de.archive.ubuntu.com/ubuntu/ saucy-updates main restricted
#deb-src http://de.archive.ubuntu.com/ubuntu/ saucy-updates main multiverse restricted universe

Save the file and execute

sudo apt-get update && sudo apt-get install build-essential

I also recommend installing

sudo apt-get install libxml2-dev and libxslt1-dev

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM