metasploit_in_termux: Can't install nokogiri 1.14.5

Installing nokogiri 1.14.5 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri /data/data/com.termux/files/usr/bin/ruby extconf.rb –use-system-libraries –with-xml2-include=/data/data/com.termux/files/usr/include/libxml2 checking for whether -std=c99 is accepted as CFLAGS… yes checking for whether -Wno-declaration-after-statement is accepted as CFLAGS… yes checking for whether -O2 is accepted as CFLAGS… yes checking for whether -g is accepted as CFLAGS… yes checking for whether -Winline is accepted as CFLAGS… yes checking for whether -Wmissing-noreturn is accepted as CFLAGS… yes checking for whether -Wconversion -Wno-sign-conversion is accepted as CFLAGS… yes Building nokogiri using system libraries. checking for gzdopen() in -lz… yes checking for xmlParseDoc() in -lxml2… yes checking for xsltParseStylesheetDoc() in -lxslt… yes checking for exsltFuncRegister() in -lexslt… yes Using mini_portile version 2.8.5 ---------- IMPORTANT NOTICE ---------- Building Nokogiri with a packaged version of libgumbo-1.0.0-nokogiri. Configuration options: --enable-shared --disable-static Copying gumbo-parser files into tmp/aarch64-unknown-linux-android/ports/libgumbo/1.0.0-nokogiri/gumbo-parser… Running ‘compile’ for libgumbo 1.0.0-nokogiri… OK Activating libgumbo 1.0.0-nokogiri (from ports/aarch64-linux-android/libgumbo/1.0.0-nokogiri)… checking for whether -I/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri/ports/aarch64-linux-android/libgumbo/1.0.0-nokogiri/include is accepted as CPPFLAGS… yes checking for gumbo_parse_with_options() in nokogiri_gumbo.h… yes checking for xmlHasFeature()… yes checking for xmlFirstElementChild()… yes checking for xmlRelaxNGSetParserStructuredErrors()… yes checking for xmlRelaxNGSetValidStructuredErrors()… yes checking for xmlSchemaSetValidStructuredErrors()… yes checking for xmlSchemaSetParserStructuredErrors()… yes checking for rb_gc_location()… yes checking for rb_category_warning()… yes checking for whether -DNOKOGIRI_OTHER_LIBRARY_VERSIONS=“"libgumbo:1.0.0-nokogiri"” is accepted as CPPFLAGS… yes creating Makefile
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri make DESTDIR= sitearchdir=./.gem.20231121-4872-4avv59 sitelibdir=./.gem.20231121-4872-4avv59 clean
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri make DESTDIR= sitearchdir=./.gem.20231121-4872-4avv59 sitelibdir=./.gem.20231121-4872-4avv59 compiling gumbo.c compiling html4_document.c html4_document.c:49:52: error: incompatible function pointer types passing ‘void (void *, xmlErrorPtr)’ (aka ‘void (void *, struct _xmlError )') to parameter of type ‘xmlStructuredErrorFunc’ (aka 'void ()(void *, const struct _xmlError *)’) [-Wincompatible-function-pointer-types] 49 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /data/data/com.termux/files/usr/include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter ‘handler’ here 898 | xmlStructuredErrorFunc handler); | ^ html4_document.c:109:52: error: incompatible function pointer types passing ‘void (void *, xmlErrorPtr)’ (aka ‘void (void *, struct _xmlError )') to parameter of type ‘xmlStructuredErrorFunc’ (aka 'void()(void *, const struct _xmlError *)’) [-Wincompatible-function-pointer-types] 109 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /data/data/com.termux/files/usr/include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter ‘handler’ here 898 | xmlStructuredErrorFunc handler); | ^ 2 errors generated. make: *** [Makefile:248: html4_document.o] Error 1
make failed, exit code 2
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5 for inspection. Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/aarch64-linux-android/3.2.0/nokogiri-1.14.5/gem_make.out
An error occurred while installing nokogiri (1.14.5), and Bundler cannot continue. Make sure that gem install nokogiri -v '1.14.5' --source 'https://rubygems.org/' succeeds before bundling. In Gemfile: factory_bot_rails was resolved to 6.2.0, which depends on railties was resolved to 7.0.8, which depends on actionpack was resolved to 7.0.8, which depends on actionview was resolved to 7.0.8, which depends on rails-dom-testing was resolved to 2.2.0, which depends on nokogiri

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 111 (48 by maintainers)

Most upvoted comments

My work here is done gud luck. I have works to do for my client regarding cracking a Themida protected software using Frida. Hope you get it @gushmazuko

Screenshot_2024-01-24-20-25-11-734_com termux

Screenshot_2024-01-24-20-25-19-876_com termux not working bro Look😭😞 Screenshot_2024-01-24-20-25-35-501_com termux

Wait I reinstall and check it again it’s last time btw you know how to change AndroRAT app build icon and app because it’s really trash how i send someone I want to change app icon and app name (app name default Google Framework somthing) it’s really dump anyone know so pls tell you help me a lot 🤝🤝🤝👨‍💻

BRO NOT WORKING …/opt/metasploit-framework $ msfconsole Metasploit tip: Start commands with a space to avoid saving them to history /data/data/com.termux/files/usr/opt/metasploit-framework/lib/net/dns/resolver.rb:1087:in foreach': No such file or directory @ rb_sysopen - /etc/resolv.conf (Errno::ENOENT) from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/net/dns/resolver.rb:1087:in parse_config_file’ from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/rex/proto/dns/resolver.rb:66:in initialize' from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/rex/proto/dns/cached_resolver.rb:25:in initialize’ from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/msf/ui/console/driver.rb:83:in new' from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/msf/ui/console/driver.rb:83:in initialize’ from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/metasploit/framework/command/console.rb:66:in new' from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/metasploit/framework/command/console.rb:66:in driver’ from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/metasploit/framework/command/console.rb:54:in start' from /data/data/com.termux/files/usr/opt/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in start’ from /data/data/com.termux/files/usr/bin/msfconsole:23:in `

https://github.com/gushmazuko/metasploit_in_termux/issues/260#issuecomment-1888617189 see

@gushmazuko all issues have been resolved, you can close this one

Can you give us full details how to do it or make it in your script

You can install it using the commands in the repository. They updated it and now it installs metasploit without any problems

@gushmazuko Estoy lanzando archivos de gemas prediseñados de nokogiri ( 1.14.5& 1.15.5) que compilé desde la fuente. No dudes en comprobarlo.

Simplemente agreguegem 'Nokogiri_precompiled_aarch64_dedshit', '~> 1.14', '>= 1.14.5' Gemfile.lock

Captura de pantalla_20231128_010207

Pd: sólo para aarch64

@gushmazuko Estoy lanzando archivos de gemas prediseñados de nokogiri ( 1.14.5& 1.15.5) que compilé desde la fuente. No chicos en comprobarlo.

Simplemente agregagem 'Nokogiri_precompiled_aarch64_dedshit', '~> 1.14', '>= 1.14.5' Gemfile.lock

Captura de pantalla_20231128_010207

Pd: sólo para aarch64

gem install Nokogiri_precompiled_aarch64_dedshit Building native extensions. This could take a while… ERROR: Error installing Nokogiri_precompiled_aarch64_dedshit: ERROR: Failed to build gem native extension.

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/Nokogiri_precompiled_aarch64_dedshit-1.14.5/ext/nokogiri

/data/data/com.termux/files/usr/bin/ruby extconf.rb checking for whether -std=c89 is accepted as CFLAGS… no checking for whether -Wno-declaration-after-statement is accepted as CFLAGS… yes checking for whether -wimplicit-function-declaration is accepted as CFLAGS… no checking for whether -O2 is accepted as CFLAGS… yes checking for whether -wimplicit-function-declaration is accepted as CFLAGS… no checking for whether -g is accepted as CFLAGS… yes checking for whether -Winline is accepted as CFLAGS… yes checking for whether -Wmissing-noreturn is accepted as CFLAGS… yes checking for whether -Wconversion -Wno-sign-conversion is accepted as CFLAGS… yes Building nokogiri using packaged libraries. Static linking is enabled. Cross build is disabled. Using mini_portile version 2.8.5 checking for iconv… yes ---------- IMPORTANT NOTICE ---------- Building Nokogiri with a packaged version of libxml2-2.10.4. Configuration options: --host=aarch64-unknown-linux-android --enable-static --disable-shared --libdir=/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/Nokogiri_precompiled_aarch64_dedshit-1.14.5/ports/aarch64-linux-android/libxml2/2.10.4/lib --with-iconv=yes --disable-dependency-tracking --without-python --without-readline --with-c14n --with-debug --with-threads --disable-shared --enable-static CFLAGS=-O2\ -U_FORTIFY_SOURCE\ -g\ -fPIC

The Nokogiri maintainers intend to provide timely security updates, but if this is a concern for you and want to use your OS/distro system library instead, then abort this installation process and install nokogiri as instructed at:

https://nokogiri.org/tutorials/installing_nokogiri.html#installing-using-standard-system-libraries

Note, however, that nokogiri cannot guarantee compatibility with every version of libxml2 that may be provided by OS/package vendors.

Downloading libxml2-2.10.4.tar.xz (100%) Extracting libxml2-2.10.4.tar.xz into tmp/aarch64-unknown-linux-android/ports/libxml2/2.10.4… ERROR. Please review logs to see what happened: ----- contents of ‘/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/Nokogiri_precompiled_aarch64_dedshit-1.14.5/ext/nokogiri/tmp/aarch64-unknown-linux-android/ports/libxml2/2.10.4/extract.log’ ----- tar: libxml2-2.10.4/test/relaxng/ambig_name-class.xml: Cannot hard link to ‘libxml2-2.10.4/test/relaxng/ambig_name-class2.rng’: Permission denied tar: libxml2-2.10.4/test/relaxng/ambig_name-class.rng: Cannot hard link to ‘libxml2-2.10.4/test/relaxng/tutorA.rng’: Permission denied tar: Exiting with failure status due to previous errors ----- end of file ----- *** 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=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME) –help –clean –prevent-strip –enable-system-libraries –disable-system-libraries –use-system-libraries –enable-system-libraries –disable-system-libraries –use-system-libraries –enable-static –enable-cross-build –disable-cross-build –enable-cross-build –disable-cross-build –with-zlib-dir –without-zlib-dir –with-zlib-include –without-zlib-include=${zlib-dir}/include –with-zlib-lib –without-zlib-lib=${zlib-dir}/lib –with-xml2-source-dir /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:612:in block in execute': Failed to complete extract task (RuntimeError) from /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:578:in chdir’ from /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:578:in execute' from /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:564:in extract_file’ from /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:138:in block in extract' from /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:136:in each’ from /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:136:in extract' from /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/mini_portile2-2.8.5/lib/mini_portile2/mini_portile.rb:231:in cook’ from extconf.rb:540:in block (2 levels) in process_recipe' from extconf.rb:319:in chdir’ from extconf.rb:319:in chdir_for_build' from extconf.rb:540:in block in process_recipe’ from internal:kernel:90:in tap' from extconf.rb:438:in process_recipe’ from extconf.rb:840:in `<main>’

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/aarch64-linux-android/3.2.0/Nokogiri_precompiled_aarch64_dedshit-1.14.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/Nokogiri_precompiled_aarch64_dedshit-1.14.5 for inspection. Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/aarch64-linux-android/3.2.0/Nokogiri_precompiled_aarch64_dedshit-1.14.5/gem_make.out

Installing nokogiri 1.14.5 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri /data/data/com.termux/files/usr/bin/ruby extconf.rb –use-system-libraries –with-xml2-include=/data/data/com.termux/files/usr/include/libxml2 checking for whether -std=c99 is accepted as CFLAGS… yes checking for whether -Wno-declaration-after-statement is accepted as CFLAGS… yes checking for whether -O2 is accepted as CFLAGS… yes checking for whether -g is accepted as CFLAGS… yes checking for whether -Winline is accepted as CFLAGS… yes checking for whether -Wmissing-noreturn is accepted as CFLAGS… yes checking for whether -Wconversion -Wno-sign-conversion is accepted as CFLAGS… yes Building nokogiri using system libraries. checking for gzdopen() in -lz… yes checking for xmlParseDoc() in -lxml2… yes checking for xsltParseStylesheetDoc() in -lxslt… yes checking for exsltFuncRegister() in -lexslt… yes Using mini_portile version 2.8.5 ---------- IMPORTANT NOTICE ---------- Building Nokogiri with a packaged version of libgumbo-1.0.0-nokogiri. Configuration options: --enable-shared --disable-static Copying gumbo-parser files into tmp/aarch64-unknown-linux-android/ports/libgumbo/1.0.0-nokogiri/gumbo-parser… Running ‘compile’ for libgumbo 1.0.0-nokogiri… OK Activating libgumbo 1.0.0-nokogiri (from ports/aarch64-linux-android/libgumbo/1.0.0-nokogiri)… checking for whether -I/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri/ports/aarch64-linux-android/libgumbo/1.0.0-nokogiri/include is accepted as CPPFLAGS… yes checking for gumbo_parse_with_options() in nokogiri_gumbo.h… yes checking for xmlHasFeature()… yes checking for xmlFirstElementChild()… yes checking for xmlRelaxNGSetParserStructuredErrors()… yes checking for xmlRelaxNGSetValidStructuredErrors()… yes checking for xmlSchemaSetValidStructuredErrors()… yes checking for xmlSchemaSetParserStructuredErrors()… yes checking for rb_gc_location()… yes checking for rb_category_warning()… yes checking for whether -DNOKOGIRI_OTHER_LIBRARY_VERSIONS=“"libgumbo:1.0.0-nokogiri"” is accepted as CPPFLAGS… yes creating Makefile

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri make DESTDIR= sitearchdir=./.gem.20231128-876-he257 sitelibdir=./.gem.20231128-876-he257 clean

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri make DESTDIR= sitearchdir=./.gem.20231128-876-he257 sitelibdir=./.gem.20231128-876-he257 compiling gumbo.c compiling html4_document.c html4_document.c:49:52: error: incompatible function pointer types passing ‘void (void *, xmlErrorPtr)’ (aka ‘void (void *, struct _xmlError )') to parameter of type ‘xmlStructuredErrorFunc’ (aka 'void ()(void *, const struct _xmlError *)’) [-Wincompatible-function-pointer-types] 49 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /data/data/com.termux/files/usr/include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter ‘handler’ here 898 | xmlStructuredErrorFunc handler); | ^ html4_document.c:109:52: error: incompatible function pointer types passing ‘void (void *, xmlErrorPtr)’ (aka ‘void (void *, struct _xmlError )') to parameter of type ‘xmlStructuredErrorFunc’ (aka 'void ()(void *, const struct _xmlError *)’) [-Wincompatible-function-pointer-types] 109 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /data/data/com.termux/files/usr/include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter ‘handler’ here 898 | xmlStructuredErrorFunc handler); | ^ 2 errors generated. make: *** [Makefile:248: html4_document.o] Error 1

make failed, exit code 2

Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5 for inspection. Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/aarch64-linux-android/3.2.0/nokogiri-1.14.5/gem_make.out

An error occurred while installing nokogiri (1.14.5), and Bundler cannot continue. Make sure that gem install nokogiri -v '1.14.5' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile: factory_bot_rails was resolved to 6.2.0, which depends on railties was resolved to 7.0.8, which depends on actionpack was resolved to 7.0.8, which depends on actionview was resolved to 7.0.8, which depends on rails-dom-testing was resolved to 2.2.0, which depends on nokogiri

@gushmazuko I’m releasing nokogiri prebuilt gem files (1.14.5 & 1.15.5) that I built it from source. Feel free to check that.

Just add gem 'Nokogiri_precompiled_aarch64_dedshit', '~> 1.14', '>= 1.14.5' in Gemfile.lock

Screenshot_20231128_010207

Ps : only for aarch64

No publique la respuesta de IA aquí; solo piensa y descubre el problema@Darkrevengehack

Pero si publicaste y arreglaste el error porque no lo haces?, a demás es una ayuda la ia

Fine then do what AI said let’s see Metasploit will work or not

Perhaps I have made some progress in solving this problem. At least I was able to install a working nokogiri 1.14.5. To begin with, I completely removed termux from the phone and, after only pkg upgrade, installed metasploit on clean termux. Next, after the same nokogiri errors, I tried to install the required version of nokogiri using

gem install nokogiri -v 1.14.5

But this gave me an error where it was clear that access to the installation was denied, and I used sudo (root rights are needed)

sudo gem install nokogiri -v 1.14.5

And the installation was successful. Then, when I entered the mfsconsole command, I received an error about the lack of a package other than nokogiri. Then I went to the metasploit-framework directory and ran bundle install:

cd /data/data/com.termux/files/usr/opt/metasploit-framework

bundle install

And everything also seems to have gone well, 18 packages were installed and now metasploit displays the following error when launched: Снимок

I have no idea what this file is and what it is responsible for, but at least I solved the issue with nokogiri, if this solution helps anyone else, write and help me solve the following error

here’s also mkmf.log

mkmf.log

=========================== Installation complete ============================

Start Metasploit using the command: msfconsole

…/opt/metasploit-framework $ msfconsole Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call DidYouMean.correct_error(error_name, spell_checker)’ instead. Could not find nokogiri-1.14.5 in any of the sources Run bundle install to install missing gems. …/opt/metasploit-framework $ bundle install Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call DidYouMean.correct_error(error_name, spell_checker)’ instead. Fetching gem metadata from https://rubygems.org/… Using rake 13.0.6 Using Ascii85 1.1.0 Using crass 1.0.6 Using rack 2.2.8 Using public_suffix 5.0.3 Using afm 0.2.2 Using mime-types-data 3.2023.1003 Using require_all 3.0.0 Using diff-lcs 1.5.0 Using rspec-support 3.12.1 Using systemu 2.6.5 Using ast 2.4.2 Using aws-eventstream 1.2.0 Using aws-partitions 1.834.0 Using jmespath 1.6.2 Using base64 0.1.1 Using bcrypt 3.1.19 Using bcrypt_pbkdf 1.1.0 Using bindata 2.4.15 Using msgpack 1.6.1 Using bson 4.15.0 Using bundler 2.1.4 Using byebug 11.1.3 Using chunky_png 1.4.0 Using mini_portile2 2.8.4 Using cookiejar 0.3.3 Using racc 1.7.1 Using date 3.3.3 Using io-console 0.6.0 Using unf_ext 0.0.8.2 Using docile 1.4.0 Using ed25519 1.3.0 Using eventmachine 1.2.7 Using http_parser.rb 0.8.0 Using method_source 1.0.0 Using thor 1.2.2 Using zeitwerk 2.6.12 Using faraday-net_http 3.0.2 Using ruby2_keywords 0.0.5 Using websocket-extensions 0.1.5 Using ffi 1.16.3 Using filesize 0.2.0 Using fivemat 1.3.7 Using rexml 3.2.6 Using hashery 2.1.2 Using hrr_rb_ssh 0.4.2 Using httpclient 2.8.3 Using rkelly-remix 0.0.7 Using json 2.6.3 Using language_server-protocol 3.17.0.3 Using little-plugger 1.1.4 Using multi_json 1.15.0 Using memory_profiler 1.0.1 Using builder 3.2.4 Using pg 1.5.4 Using webrick 1.8.1 Using net-ssh 7.2.0 Using rex-core 0.1.31 Using minitest 5.20.0 Using rubyzip 2.3.2 Using metasploit-payloads 2.0.159 Using metasploit_payloads-mettle 1.0.26 Using mqtt 0.6.0 Using concurrent-ruby 1.2.2 Using timeout 0.4.0 Using net-ldap 0.18.0 Using network_interface 0.0.4 Using nexpose 7.3.0 Using openssl-ccm 1.2.3 Using openvas-omp 0.0.4 Using pcaprub 0.13.1 Using patch_finder 1.0.2 Using ruby-rc4 0.1.5 Using ttfunk 1.7.0 Using nio4r 2.5.9 Using strptime 0.2.5 Using rb-readline 0.5.5 Using redcarpet 3.6.0 Using rex-text 0.2.53 Using rex-struct2 0.1.4 Using daemons 1.4.1 Using rex-registry 0.1.5 Using ruby-macho 4.0.0 Using ruby-mysql 4.1.0 Using openssl-cmac 2.0.2 Using windows_error 0.1.5 Using tilt 2.3.0 Using sshkey 3.0.0 Using swagger-blocks 3.0.0 Using metasm 1.0.5 Using win32api 0.1.0 Using coderay 1.1.3 Using parallel 1.23.0 Using rainbow 3.1.1 Using regexp_parser 2.8.1 Using ruby-progressbar 1.13.0 Using unicode-display_width 2.5.0 Using ruby-prof 1.4.2 Using simplecov-html 0.12.3 Using test-prof 1.2.3 Using timecop 0.9.8 Using yard 0.9.34 Using rack-test 2.1.0 Using rack-protection 3.1.0 Using warden 1.2.9 Using addressable 2.8.5 Using mime-types 3.5.1 Using rspec-expectations 3.12.3 Using rspec-core 3.12.2 Using rspec-mocks 3.12.6 Using macaddr 1.7.2 Using aws-sigv4 1.6.0 Using bootsnap 1.16.0 Using sqlite3 1.6.6 Using nori 2.6.0 Using parser 3.2.2.4 Using reline 0.3.8 Using unf 0.1.4 Using em-socksify 0.3.2 Using faraday 2.7.11 Using mustermann 3.0.0 Using websocket-driver 0.7.6 Using gssapi 1.3.1 Using hrr_rb_ssh-ed25519 0.4.2 Using jsobfu 0.4.2 Using gyoku 1.4.0 Using nessus_rest 0.1.6 Using logging 2.3.1 Using rex-socket 0.1.54 Using i18n 1.14.1 Using tzinfo 2.0.6 Using net-protocol 0.2.1 Using packetfu 2.0.0 Using pdf-reader 2.11.0 Using puma 6.4.0 Using rasn1 0.12.1 Using rex-arch 0.1.15 Using rex-mime 0.1.8 Using rex-ole 0.1.8 Using rex-random_identifier 0.1.11 Using rex-zip 0.1.5 Using thin 1.8.2 Using erubi 1.12.0 Using rex-rop_builder 0.1.5 Using simplecov 0.18.2 Using rspec 3.12.0 Using uuid 2.3.9 Using aws-sdk-core 3.185.1 Using irb 1.7.4 Using rex-java 0.1.7 Using domain_name 0.5.20190701 Using rubocop-ast 1.29.0 Using sawyer 0.9.2 Using em-http-request 1.1.7 Using faraday-retry 2.2.0 Using sinatra 3.1.0 Using faye-websocket 0.11.3 Using faker 3.2.1 Using rex-sslscan 0.1.10 Using activesupport 7.0.8 Using tzinfo-data 1.2023.3 Using net-imap 0.4.0 Using simpleidn 0.2.1 Using rex-bin_tools 0.1.9 Using rex-encoder 0.1.7 Using rex-nop 0.1.3 Using rex-powershell 0.1.99 Using allure-ruby-commons 2.23.0 Using rspec-rerun 1.1.0 Using rubyntlm 0.6.3 Using aws-sdk-ec2instanceconnect 1.34.0 Using aws-sdk-iam 1.87.0 Using aws-sdk-kms 1.72.0 Using aws-sdk-ssm 1.158.0 Using debug 1.8.0 Using http-cookie 1.0.5 Using rubocop 1.56.4 Using unix-crypt 1.3.1 Using activemodel 7.0.8 Using factory_bot 6.2.1 Using dnsruby 1.70.0 Using rex-exploitation 0.1.39 Using allure-rspec 2.23.0 Using ruby_smb 3.2.6 Using winrm 2.3.6 Using aws-sdk-s3 1.136.0 Using activerecord 7.0.8 Using xdr 3.0.3 Using arel-helpers 2.14.0 Using octokit 4.25.1 Using pry 0.14.2 Using net-smtp 0.4.0 Using xmlrpc 0.3.3 Using aws-sdk-ec2 1.411.0 Fetching nokogiri 1.14.5 Using pry-byebug 3.10.1 Installing nokogiri 1.14.5 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri /data/data/com.termux/files/usr/bin/ruby extconf.rb --use-system-libraries --with-xml2-include=/data/data/com.termux/files/usr/include/libxml2 checking for whether -std=c99 is accepted as CFLAGS… yes checking for whether -Wno-declaration-after-statement is accepted as CFLAGS… yes checking for whether -O2 is accepted as CFLAGS… yes checking for whether -g is accepted as CFLAGS… yes checking for whether -Winline is accepted as CFLAGS… yes checking for whether -Wmissing-noreturn is accepted as CFLAGS… yes checking for whether -Wconversion -Wno-sign-conversion is accepted as CFLAGS… yes Building nokogiri using system libraries. checking for gzdopen() in -lz… yes checking for xmlParseDoc() in -lxml2… yes checking for xsltParseStylesheetDoc() in -lxslt… yes checking for exsltFuncRegister() in -lexslt… yes Using mini_portile version 2.8.5 ---------- IMPORTANT NOTICE ---------- Building Nokogiri with a packaged version of libgumbo-1.0.0-nokogiri. Configuration options: --enable-shared --disable-static Copying gumbo-parser files into tmp/aarch64-unknown-linux-android/ports/libgumbo/1.0.0-nokogiri/gumbo-parser… Running ‘compile’ for libgumbo 1.0.0-nokogiri… OK Activating libgumbo 1.0.0-nokogiri (from ports/aarch64-linux-android/libgumbo/1.0.0-nokogiri)… checking for whether -I/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri/ports/aarch64-linux-android/libgumbo/1.0.0-nokogiri/include is accepted as CPPFLAGS… yes checking for gumbo_parse_with_options() in nokogiri_gumbo.h… yes checking for xmlHasFeature()… yes checking for xmlFirstElementChild()… yes checking for xmlRelaxNGSetParserStructuredErrors()… yes checking for xmlRelaxNGSetValidStructuredErrors()… yes checking for xmlSchemaSetValidStructuredErrors()… yes checking for xmlSchemaSetParserStructuredErrors()… yes checking for rb_gc_location()… yes checking for rb_category_warning()… yes checking for whether -DNOKOGIRI_OTHER_LIBRARY_VERSIONS=“"libgumbo:1.0.0-nokogiri"” is accepted asCPPFLAGS… yes creating Makefile
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri make DESTDIR= sitearchdir=./.gem.20231122-31092-mohe8e sitelibdir=./.gem.20231122-31092-mohe8e clean
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri make DESTDIR= sitearchdir=./.gem.20231122-31092-mohe8e sitelibdir=./.gem.20231122-31092-mohe8e compiling gumbo.c compiling html4_document.c html4_document.c:49:52: error: incompatible function pointer types passing ‘void (void *, xmlErrorPtr)’ (aka ‘void (void *, struct _xmlError )') to parameter of type ‘xmlStructuredErrorFunc’ (aka 'void ()(void *, const struct _xmlError *)’) [-Wincompatible-function-pointer-types] 49 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /data/data/com.termux/files/usr/include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter ‘handler’ here 898 | xmlStructuredErrorFunc handler); | ^ html4_document.c:109:52: error: incompatible function pointer types passing ‘void (void *, xmlErrorPtr)’ (aka ‘void (void *, struct _xmlError )') to parameter of type ‘xmlStructuredErrorFunc’ (aka 'void ()(void *, const struct _xmlError *)’) [-Wincompatible-function-pointer-types] 109 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /data/data/com.termux/files/usr/include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter ‘handler’ here 898 | xmlStructuredErrorFunc handler); | ^ 2 errors generated. make: *** [Makefile:248: html4_document.o] Error 1

make failed, exit code 2

Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5 for inspection. Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/aarch64-linux-android/3.2.0/nokogiri-1.14.5/gem_make.out

An error occurred while installing nokogiri (1.14.5), and Bundler cannot continue. Make sure that gem install nokogiri -v '1.14.5' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile: factory_bot_rails was resolved to 6.2.0, which depends on railties was resolved to 7.0.8, which depends on actionpack was resolved to 7.0.8, which depends on actionview was resolved to 7.0.8, which depends on rails-dom-testing was resolved to 2.2.0, which depends on nokogiri

First in order to have updated Termux:

  • Purge all data of Termux in Android Settings
  • Uninstall and reinstall latest Termux version from F-Droid (Version on Play Store is outdated)
  • Then launch Termux to initialization, close it (force stop, not swap)
  • Reopen and follow the instructions below

Upgrade Termux:

pkg update -y
pkg upgrade -y

Then:

source <(curl -fsSL https://kutt.it/msf)

cc @wakhidrf @Konstantin411