gushmazuko / metasploit_in_termux

Install Metasploit Framework 6 in Termux
MIT License
1.53k stars 255 forks source link

Can't install nokogiri 1.14.5 #260

Closed wakhidrf closed 7 months ago

wakhidrf commented 9 months ago

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

Konstantin411 commented 9 months ago

Exactly same problem

gushmazuko commented 9 months ago

Describe the bug A clear and concise description of what the bug is.

Smartphone (please complete the following information):

wakhidrf commented 9 months ago

Can't install nekogiri due to libxml2 i guess,cause i had some problem when install libxml-ruby and python lxml.

Device Oppo cph2387 Os android 13 termux 118

gushmazuko commented 9 months ago

Oppo cph2387

can you also execute:

uname -r
Konstantin411 commented 9 months ago

Can't install nekogiri due to libxml2 i guess,cause i had some problem when install libxml-ruby and python lxml.

Device Oppo cph2387 Os android 13 termux 118

And just recently I also had problems with any packages that use lxlm, reinstalling termux and any other solutions from the Internet did not help

Device POCO X3 Pro OS Android 13 Termux 118

wakhidrf commented 9 months ago

4.19.191+

gushmazuko commented 9 months ago

First in order to have updated Termux:

Upgrade Termux:

pkg update -y
pkg upgrade -y

Then:

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

cc @wakhidrf @Konstantin411

wakhidrf commented 9 months ago

Done trying multiple times,the result was like this

wakhidrf commented 9 months ago

=========================== 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 callDidYouMean.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 callDidYouMean.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

wakhidrf commented 9 months ago

here's also mkmf.log

mkmf.log

Darkrevengehack commented 9 months ago

Bro, a mi tambien me pasa el mismo problema: /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:inchdir' 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:inextract_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:ineach' 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:incook' from extconf.rb:540:in block (2 levels) in process_recipe' from extconf.rb:319:inchdir' from extconf.rb:319:in chdir_for_build' from extconf.rb:540:inblock in process_recipe' from :90:in tap' from extconf.rb:438:inprocess_recipe' from extconf.rb:872:in `

'

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-1.15.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-1.15.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.15.5/gem_make.out Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please callDidYouMean.correct_error(error_name, spell_checker)' instead. Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies............. Using rake 13.0.6 Using Ascii85 1.1.0 Using concurrent-ruby 1.2.2 Using i18n 1.14.1 Using minitest 5.20.0 Using tzinfo 2.0.6 Using activesupport 7.0.8

Device: Motorola G60s

OS: Android 12

Termux Version: 0.118

wakhidrf commented 9 months ago

Got an update of libxml2 to version 2.12.1 today,still has an issue installing nokogiri,here's the gem makeout log

gem_make.out.txt

Darkrevengehack commented 9 months ago

Got an update of libxml2 to version 2.12.1 today,still has an issue installing nokogiri,here's the gem makeout log

gem_make.out.txt

Looks like there's a compilation error while building Nokogiri. The error points to incompatible function pointer types in html4_document.c. This could be due to a mismatch between the expected and actual types for error handling.

One approach to solve this is to try updating your Nokogiri gem or the Ruby version, as newer versions might address such compatibility issues. Alternatively, you may need to check for any specific build options or dependencies required by Nokogiri in the Termux environment.

dedshit commented 9 months ago

Is this what you are looking for

Konstantin411 commented 9 months ago

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

dedshit commented 9 months ago

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

Change the path /etc/resolv.config to $PREFIX/etc/resolv.config Also nokogiri doesn't need su rights for installation just few adjustments in cflags, function declaration

gushmazuko commented 9 months ago

Change the path /etc/resolv.config to $PREFIX/etc/resolv.config

There is something wrong with installation or termux. In my installation I don't changed resolver.rb

image

dedshit commented 9 months ago

Change the path /etc/resolv.config to $PREFIX/etc/resolv.config

There is something wrong with installation or termux. In my installation I don't changed resolver.rb

image

By default they set /etc which requires su permission & tries to open resolv.conf . Instead of using that changing the path will work

Konstantin411 commented 9 months ago

By default they set /etc which requires su permission & tries to open resolv.conf . Instead of using that changing the path will work

Are you saying that the error occurred because I used superuser rights? Sorry, I may misunderstand something in English.

And please also tell me a specific command on how to change this path to the correct one

Darkrevengehack commented 9 months ago

De forma predeterminada, configuran /etccuál requiere su permiso e intentan abrir resolv.conf. En lugar de usar eso, cambiar la ruta funcionará

¿Estás diciendo que el error ocurrió porque usé derechos de superusuario? Lo siento, es posible que entienda mal algo en inglés.

Y por favor dígame también un comando específico sobre cómo cambiar esta ruta a la correcta.

El error parece estar relacionado con la ruta del archivo de configuración /etc/resolv.conf. Parece que al usar derechos de superusuario (sudo), se ha cambiado la ruta predeterminada de búsqueda de este archivo.

Para corregir esto, puedes intentar el siguiente comando en el directorio de Metasploit:

sed -i 's/\/etc\/resolv.conf/$PREFIX\/etc\/resolv.conf/' lib/net/dns/resolver.rb

Este comando utiliza el comando sed para reemplazar todas las instancias de /etc/resolv.conf con $PREFIX/etc/resolv.conf en el archivo lib/net/dns/resolver.rb.

Después de ejecutar este comando, intenta iniciar Metasploit nuevamente con msfconsole y verifica si el error persiste. Esto debería solucionar el problema relacionado con la ruta del archivo de configuración de DNS.

Darkrevengehack commented 9 months ago

De forma predeterminada, configure /etccuál requiere su permiso e intente abrir resolv.conf. En lugar de usar eso, cambiar la ruta funcionará

¿Estás diciendo que el error ocurrió porque usé derechos de superusuario? Lo siento, es posible que entienda mal algo en inglés.

Y por favor dígame también un comando específico sobre cómo cambiar esta ruta a la correcta.

https://chat.openai.com/share/a9b8b1ff-c7fd-42ab-87e9-18c1973d399e

dedshit commented 9 months ago

Dont post AI answer here ; just think & figured it out the problem @Darkrevengehack

Darkrevengehack commented 9 months ago

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

dedshit commented 9 months ago

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

dedshit commented 9 months ago

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

I already build nokogiri for armv7 and aarch64 from source code and I guarantee that msfconsole won't work :)

Darkrevengehack commented 9 months ago

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

Ya compilé nokogiri para armv7 y aarch64 desde el código fuente y garantizo que msfconsole no funcionará :)

Quien garantizo eso?

A demás, los creadores de metasploit son tan nenas que sacaron metasploit de termux, sin eso que se supone que hagamos?

dedshit commented 9 months ago

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

Konstantin411 commented 9 months ago

I decided to start over, so as not to use root rights and not face the previous problems, I installed everything as usual and came to an error exactly like this:

Got an update of libxml2 to version 2.12.1 today,still has an issue installing nokogiri,here's the gem makeout log

gem_make.out.txt

I decided to look at nokogiri changelogs and it says that nokogiri in the latest update 1.15.5 is only suitable for libxml2 version 2.11.6, and we automatically install version 2.12.1.

I tried to downgrade it, but the old version was not found in the termux repositories. Could this version difference be the cause of the error and if so, how to downgrade libxml2?

dedshit commented 9 months ago

@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

SebiOnGitHub commented 9 months ago

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 commented 9 months ago

@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.

Ps : only for aarch64

Can you clarify the specific issue you're experiencing with aarch64? I'm not having any problems with it currently.

Also you can check the installation check procedure using nokogiri 1.14.5: https://gitlab.com/gushmazuko/metasploit_in_termux/-/jobs/5542853671#L492

dedshit commented 9 months ago

@gushmazuko use aarch64 image in docker

dedshit commented 9 months ago

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

Try gem install Nokogiri_precompiled_aarch64_dedshit then follow the rest of the things

dedshit commented 9 months ago

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

It clearly shows that Function is not declared. solution for that is just declare a void function with parameter as pointer to a variable

ANDROID1010 commented 8 months ago

I have the problem gem install nokogiri -v '1.14.5' --source 'https://rubygems.org/' Building native extensions. This could take a while... ERROR: Error installing nokogiri: 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 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 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-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 following patches are being applied:

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.

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-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:inchdir' 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:inextract_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:ineach' 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:incook' from extconf.rb:540:in block (2 levels) in process_recipe' from extconf.rb:319:inchdir' from extconf.rb:319:in chdir_for_build' from extconf.rb:540:inblock in process_recipe' from :90:in tap' from extconf.rb:438:inprocess_recipe' from extconf.rb:838:in `

'

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-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-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

Please give me the solution

dedshit commented 8 months ago

@ANDROID1010 i already gave a hint do it yourself

Luke-Galaxy commented 8 months ago

@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:inchdir' 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:inextract_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:ineach' 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:incook' from extconf.rb:540:in block (2 levels) in process_recipe' from extconf.rb:319:inchdir' from extconf.rb:319:in chdir_for_build' from extconf.rb:540:inblock in process_recipe' from :90:in tap' from extconf.rb:438:inprocess_recipe' from extconf.rb:840:in `

'

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

dedshit commented 8 months ago

nokogiri-1.14.5.tar.gz

extract & install the gem file using system-libraries

SebiOnGitHub commented 8 months ago

Thx

dum., 31 dec. 2023, 03:57 dedshit @.***> a scris:

nokogiri-1.14.5.tar.gz https://github.com/gushmazuko/metasploit_in_termux/files/13799954/nokogiri-1.14.5.tar.gz extract & install the gem file using system-libraries

— Reply to this email directly, view it on GitHub https://github.com/gushmazuko/metasploit_in_termux/issues/260#issuecomment-1872647993, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBAAZH23J5V4SCKJ4RFESYDYMDBBDAVCNFSM6AAAAAA7UER4ASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGY2DOOJZGM . You are receiving this because you commented.Message ID: @.***>

WhyNotWindows commented 8 months ago

Hey @dedshit , I read the whole thread and see that you understand the issue. I tried both ways you said, "gem install nokogiri prrecompiled" and the tar file. Both give me errors. There are 2 types I got so far, permission denied when extracting libxml2:

> ----- 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 -----

And incompatible function void:

/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);

Can you tell me what is wrong and if it's possible to solve it? I know the second one it can't compile something because of function but can't solve because I don't know enough about this stuff. Thanks

dedshit commented 8 months ago

Hey @dedshit , I read the whole thread and see that you understand the issue. I tried both ways you said, "gem install nokogiri prrecompiled" and the tar file. Both give me errors. There are 2 types I got so far, permission denied when extracting libxml2:

> ----- 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 -----

And incompatible function void:

/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);

Can you tell me what is wrong and if it's possible to solve it? I know the second one it can't compile something because of function but can't solve because I don't know enough about this stuff. Thanks

did you run that using -- --use-system-libraries ?

WhyNotWindows commented 8 months ago

Tried with it, got this new error: ================//=//==/========== ~ $ gem install nokogiri-1.14.5.gem -- --use-system-libraries

Building native extensions with: '--use-system-libraries' This could take a while... ERROR: Error installing nokogiri-1.14.5.gem: 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 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 system libraries. checking for gzdopen() in -lz... yes checking for xmlParseDoc() in -lxml2... no checking for xmlParseDoc() in -llibxml2... no checking for libxml-2.0 using pkg_config... yes: ["-I/data/data/com.termux/files/usr/include/libxml2 -I/data/data/com.termux/files/usr/include ", "-L/data/data/com.termux/files/usr/lib", "-lxml2"] checking for xmlParseDoc() in -lxml2... yes checking for xsltParseStylesheetDoc() in -lxslt... no checking for xsltParseStylesheetDoc() in -llibxslt... no checking for libxslt using pkg_config... no Please install either the pkg-config utility or the pkg-config rubygem. checking for xsltParseStylesheetDoc() in -lxslt... no checking for xsltParseStylesheetDoc() in -llibxslt... no ----- extconf.rb:295:in ensure_package_configuration' extconf.rb:704:in
' xslt is missing. Please locate mkmf.log to investigate how it is failing.

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 --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-z-dir --without-z-dir --with-z-include --without-z-include=${z-dir}/include --with-z-lib --without-z-lib=${z-dir}/lib --with-zlib --without-zlib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-xml2lib --without-xml2lib --with-libxml2-dir --without-libxml2-dir --with-libxml2-include --without-libxml2-include=${libxml2-dir}/include --with-libxml2-lib --without-libxml2-lib=${libxml2-dir}/lib --with-libxml2lib --without-libxml2lib --with-libxml-2.0-dir --without-libxml-2.0-dir --with-libxml-2.0-include --without-libxml-2.0-include=${libxml-2.0-dir}/include --with-libxml-2.0-lib --without-libxml-2.0-lib=${libxml-2.0-dir}/lib --with-libxml-2.0-config --without-libxml-2.0-config --with-pkg-config --without-pkg-config --with-xml2lib --without-xml2lib --with-xslt-dir --without-xslt-dir --with-xslt-include --without-xslt-include=${xslt-dir}/include --with-xslt-lib --without-xslt-lib=${xslt-dir}/lib --with-xsltlib --without-xsltlib --with-libxslt-dir --without-libxslt-dir --with-libxslt-include --without-libxslt-include=${libxslt-dir}/include --with-libxslt-lib --without-libxslt-lib=${libxslt-dir}/lib --with-libxsltlib --without-libxsltlib --with-libxslt-config --without-libxslt-config --with-xsltlib --without-xsltlib --with-libxsltlib --without-libxsltlib 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-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-1.14.5 for inspection. Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/

On Tue, Jan 9, 2024, 17:00 dedshit @.***> wrote:

Hey @dedshit https://github.com/dedshit , I read the whole thread and see that you understand the issue. I tried both ways you said, "gem install nokogiri prrecompiled" and the tar file. Both give me errors. There are 2 types I got so far, permission denied when extracting libxml2:

----- 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 -----

And incompatible function void:

/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);

Can you tell me what is wrong and if it's possible to solve it? I know the second one it can't compile something because of function but can't solve because I don't know enough about this stuff. Thanks

did you run that using -- --use-system-libraries ?

— Reply to this email directly, view it on GitHub https://github.com/gushmazuko/metasploit_in_termux/issues/260#issuecomment-1883324483, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARNBXKDII7UP4FUZXQ4KA7DYNVSQJAVCNFSM6AAAAAA7UER4ASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBTGMZDINBYGM . You are receiving this because you commented.Message ID: @.***>

WhyNotWindows commented 8 months ago

The log: mkmf.log

WhyNotWindows commented 8 months ago

I noticed this error in the log:

fatal error: 'libxslt/xslt.h' file not found
    3 | #include <libxslt/xslt.h>
dedshit commented 8 months ago

I noticed this error in the log:

fatal error: 'libxslt/xslt.h' file not found
    3 | #include <libxslt/xslt.h>

libxslt installed ?

WhyNotWindows commented 8 months ago

I installed apt libxslt, don't know why didn't understand it myself. Also, I'm doing it on clear termux right now, didn't download metasploit installer yet. So after libxslt got this new error:

---------- 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... ERROR. Please review logs to see what happened:
----- contents of '/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri/tmp/aarch64-unknown-linux-android/ports/libgumbo/1.0.0-nokogiri/compile.log' -----
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o ascii.o ascii.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o attribute.o attribute.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o char_ref.o char_ref.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o error.o error.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o foreign_attrs.o foreign_attrs.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o parser.o parser.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o string_buffer.o string_buffer.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o string_piece.o string_piece.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o svg_attrs.o svg_attrs.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o svg_tags.o svg_tags.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o tag.o tag.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o tag_lookup.o tag_lookup.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o token_buffer.o token_buffer.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o tokenizer.o tokenizer.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o utf8.o utf8.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o util.o util.c
aarch64-linux-android-clang -fPIC -O2 -g -std=c99 -Wall   -c -o vector.o vector.c
ar -rv libgumbo.a ascii.o attribute.o char_ref.o error.o foreign_attrs.o parser.o string_buffer.o string_piece.o svg_attrs.o svg_tags.o tag.o tag_lookup.o token_buffer.o tokenizer.o utf8.o util.o vector.o
make: ar: No such file or directory
make: *** [Makefile:30: libgumbo.a] Error 127
----- end of file -----
dedshit commented 8 months ago

https://github.com/dedshit/metasploit_in_termux/blob/master/nokogiri-1.14.5.gem

first of all remove ruby completely rm -rf $PREFIX/lib/ruby 2) update and upgrade 3) install the above gem using system libraries if any dependencies is not installed just install it thats all

WhyNotWindows commented 8 months ago

Sorry for asking so much, but it doesn't work without ruby.

~ $ gem install nokogiri-1.14.5.gem -- --use-system-libraries
`RubyGems' were not loaded.
`error_highlight' was not loaded.
`did_you_mean' was not loaded.
`syntax_suggest' was not loaded.
/data/data/com.termux/files/usr/bin/gem:10:in `require': cannot load such file -- rubygems/gem_runner (LoadError)
        from /data/data/com.termux/files/usr/bin/gem:10:in `<main>'

I tried apt install RubyGems but there is no such package

WhyNotWindows commented 8 months ago

Oh, I tried with the previous gem. 1 sec, gonna try the one you gave

dedshit commented 8 months ago

reinstall ruby then do it again if ruby not installed