Skip to content

Can't install and run metasploit properly  #100

Description

@helpRifan

~ $ bash metasploit.sh
find: ‘/data/data/com.termux/files/home/metasploit-framework’: No such file or directory
Hit:1 https://mirror.surf/termux/termux-main stable InRelease
Hit:2 https://packages-cf.termux.dev/apt/termux-root root InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
binutils is already the newest version (2.40).
libiconv is already the newest version (1.17).
zlib is already the newest version (1.2.13).
autoconf is already the newest version (2.71-2).
bison is already the newest version (3.8.2-3).
clang is already the newest version (15.0.7).
coreutils is already the newest version (9.1-2).
curl is already the newest version (7.87.0).
findutils is already the newest version (4.9.0-2).
git is already the newest version (2.39.1).
apr is already the newest version (1.7.0-8).
apr-util is already the newest version (1.6.1-6).
libffi is already the newest version (3.4.4).
libgmp is already the newest version (6.2.1-2).
libpcap is already the newest version (1.10.3).
postgresql is already the newest version (15.1-1).
readline is already the newest version (8.2.1).
libsqlite is already the newest version (3.40.1).
openssl is already the newest version (1:3.0.7).
libtool is already the newest version (2.4.7).
libxml2 is already the newest version (2.10.3).
libxslt is already the newest version (1.1.37).
ncurses is already the newest version (6.4-1).
pkg-config is already the newest version (0.29.2-2).
wget is already the newest version (1.21.3-5).
make is already the newest version (4.4).
ruby is already the newest version (3.2.0).
libgrpc is already the newest version (1.51.1).
termux-tools is already the newest version (1.36.1).
ncurses-utils is already the newest version (6.4-1).
unzip is already the newest version (6.0-9).
zip is already the newest version (3.0-5).
tar is already the newest version (1.34-1).
termux-elf-cleaner is already the newest version (2.1.1-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:--100 502k 0 502k 0 0 248k 0 --:--:--100 3248k 0 3248k 0 0 1072k 0 --:--:--100 4801k 0 4801k 0 0 1192k 0 --:--:--100 6277k 0 6277k 0 0 1248k 0 --:--:--100 7834k 0 7834k 0 0 1299k 0 --:--:--100 9.7M 0 9.7M 0 0 1425k 0 --:--:--100 11.1M 0 11.1M 0 0 1424k 0 --:--:--100 13.5M 0 13.5M 0 0 1542k 0 --:--:--100 16.2M 0 16.2M 0 0 1659k 0 --:--:--100 17.6M 0 17.6M 0 0 1633k 0 --:--:--100 18.4M 0 18.4M 0 0 1573k 0 --:--:--100 18.5M 0 18.5M 0 0 1453k 0 --:--:--100 19.0M 0 19.0M 0 0 1364k 0 --:--:--100 20.4M 0 20.4M 0 0 1391k 0 --:--:--100 22.3M 0 22.3M 0 0 1430k 0 --:--:--100 23.9M 0 23.9M 0 0 1434k 0 --:--:--100 24.2M 0 24.2M 0 0 1366k 0 --:--:--100 24.2M 0 24.2M 0 0 1303k 0 --:--:--100 24.4M 0 24.4M 0 0 1250k 0 --:--:--100 24.6M 0 24.6M 0 0 1197k 0 --:--:--100 24.7M 0 24.7M 0 0 1152k 0 --:--:--100 25.0M 0 25.0M 0 0 1114k 0 --:--:--100 25.2M 0 25.2M 0 0 1074k 0 --:--:--100 25.3M 0 25.3M 0 0 1031k 0 --:--:--100 25.8M 0 25.8M 0 0 1016k 0 --:--:--100 27.6M 0 27.6M 0 0 1048k 0 --:--:--100 29.9M 0 29.9M 0 0 1093k 0 --:--:--100 32.0M 0 32.0M 0 0 1129k 0 --:--:--100 34.3M 0 34.3M 0 0 1171k 0 --:--:--100 36.2M 0 36.2M 0 0 1196k 0 --:--:--100 38.5M 0 38.5M 0 0 1233k 0 --:--:--100 41.0M 0 41.0M 0 0 1273k 0 --:--:--100 43.0M 0 43.0M 0 0 1294k 0 --:--:--100 43.1M 0 43.1M 0 0 1256k 0 --:--:--100 44.4M 0 44.4M 0 0 1263k 0 --:--:--100 45.7M 0 45.7M 0 0 1265k 0 --:--:--100 47.2M 0 47.2M 0 0 1273k 0 --:--:--100 48.2M 0 48.2M 0 0 1266k 0 --:--:--100 49.4M 0 49.4M 0 0 1258k 0 --:--:--100 50.8M 0 50.8M 0 0 1270k 0 --:--:--100 52.8M 0 52.8M 0 0 1288k 0 --:--:--100 55.1M 0 55.1M 0 0 1312k 0 --:--:--100 56.6M 0 56.6M 0 0 1317k 0 --:--:--100 58.1M 0 58.1M 0 0 1320k 0 --:--:--100 60.0M 0 60.0M 0 0 1336k 0 --:--:--100 61.9M 0 61.9M 0 0 1348k 0 --:--:--100 63.7M 0 63.7M 0 0 1358k 0 --:--:--100 65.1M 0 65.1M 0 0 1368k 0 --:--:-- 0:00:48 --:--:-- 1844k
Successfully installed bundler-2.4.5
Parsing documentation for bundler-2.4.5
Done installing documentation for bundler after 2 seconds
1 gem installed
Building native extensions with: '--use-system-libraries'
This could take a while...
Successfully installed nokogiri-1.12.5
Parsing documentation for nokogiri-1.12.5
Done installing documentation for nokogiri after 9 seconds
1 gem installed
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 concurrent-ruby 1.0.5
Using minitest 5.15.0
Using zeitwerk 2.5.1
Using builder 3.2.4
Using erubi 1.10.0
Using mini_portile2 2.6.1
Using racc 1.6.0
Using crass 1.0.6
Using rack 2.2.3
Using public_suffix 4.0.6
Using afm 0.2.2
Using ast 2.4.2
Using aws-eventstream 1.2.0
Using aws-partitions 1.541.0
Using jmespath 1.4.0
Using bcrypt 3.1.16
Using bcrypt_pbkdf 1.1.0
Using bindata 2.4.10
Using bson 4.12.1
Using bundler 2.1.4
Using byebug 11.1.3
Using coderay 1.1.3
Using cookiejar 0.3.3
Using daemons 1.4.1
Using diff-lcs 1.4.4
Using unf_ext 0.0.8
Using docile 1.4.0
Using faraday-em_synchrony 1.0.0
Using faraday-excon 1.1.0
Using eventmachine 1.2.7
Using faraday-net_http 1.0.1
Using method_source 1.0.0
Using faraday-net_http_persistent 1.2.0
Using faraday-patron 1.0.0
Using faraday-rack 1.0.0
Using multipart-post 2.1.1
Using ruby2_keywords 0.0.5
Using websocket-extensions 0.1.5
Using ffi 1.15.4
Using filesize 0.2.0
Using fivemat 1.3.7
Using hashery 2.1.2
Using hrr_rb_ssh 0.4.2
Using httpclient 2.8.3
Using io-console 0.5.9
Using rkelly-remix 0.0.7
Using json 2.6.1
Using little-plugger 1.1.4
Using memory_profiler 1.0.0
Using multi_json 1.15.0
Using metasm 1.0.5
Using webrick 1.7.0
Using net-ssh 6.1.0
Using http_parser.rb 0.8.0
Using rex-core 0.1.20
Using rubyntlm 0.6.3
Using rubyzip 2.3.2
Using metasploit-payloads 2.0.66
Using metasploit_payloads-mettle 1.0.17
Using msgpack 1.4.2
Using nessus_rest 0.1.6
Using net-ldap 0.17.0
Using network_interface 0.0.2
Using nexpose 7.3.0
Using openssl-ccm 1.2.2
Using openvas-omp 0.0.4
Using pcaprub 0.12.4
Using patch_finder 1.0.2
Using ruby-rc4 0.1.5
Using ttfunk 1.7.0
Using nio4r 2.5.8
Using rb-readline 0.5.5
Using redcarpet 3.5.1
Using rex-text 0.2.37
Using rex-struct2 0.1.3
Using rexml 3.2.5
Using rex-java 0.1.6
Fetching pg 1.2.3
Using thor 1.1.0
Using ruby-macho 2.5.1
Using openssl-cmac 2.0.1
Using windows_error 0.1.2
Using tilt 2.0.10
Using rex-registry 0.1.4
Using sshkey 2.0.0
Using swagger-blocks 3.0.0
Using unix-crypt 1.3.0
Using win32api 0.1.0
Using nori 2.6.0
Using parallel 1.21.0
Using rainbow 3.0.0
Using regexp_parser 2.2.0
Using rspec-support 3.10.3
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.1.0
Using ruby-prof 1.4.2
Using simplecov-html 0.12.3
Using timecop 0.9.4
Using i18n 1.8.11
Using tzinfo 2.0.4
Using nokogiri 1.12.5
Using rack-test 1.1.0
Using addressable 2.8.0
Using ed25519 1.2.4
Using aws-sigv4 1.4.0
Using unf 0.1.4
Using gyoku 1.3.1
Using warden 1.2.9
Using parser 3.0.3.2
Using rack-protection 2.1.0
Using mqtt 0.5.0
Using em-socksify 0.3.2
Using thin 1.8.1
Using websocket-driver 0.7.5
Using gssapi 1.3.1
Using reline 0.2.5
Using jsobfu 0.4.2
Using mustermann 1.1.1
Using pry 0.13.1
Using logging 2.3.0
Using xmlrpc 0.3.2
Using yard 0.9.27
Using rex-socket 0.1.34
Using pdf-reader 2.7.0
Using rex-arch 0.1.14
Using rex-mime 0.1.6
Using rex-ole 0.1.7
Using puma 5.5.2
Using rex-rop_builder 0.1.4
Using rex-zip 0.1.4
Using ruby_smb 2.0.12
Using faraday-em_http 1.0.0
Using loofah 2.13.0
Using rex-random_identifier 0.1.8
Using recog 2.3.22
Using tzinfo-data 1.2021.5
Using rspec-core 3.10.1
Using rspec-expectations 3.10.1
Using rspec-mocks 3.10.2
Using simplecov 0.18.2
Using aws-sdk-core 3.124.0
Using simpleidn 0.2.1
Using domain_name 0.5.20190701
Using hrr_rb_ssh-ed25519 0.4.2
Using em-http-request 1.1.7
Using faye-websocket 0.11.1
Using irb 1.3.6
Using rex-sslscan 0.1.7
Using winrm 2.3.6
Using pry-byebug 3.9.0
Using rubocop-ast 1.15.0
Using sinatra 2.1.0
Using rex-bin_tools 0.1.8
Using rex-encoder 0.1.6
Using rex-nop 0.1.2
Using rails-html-sanitizer 1.4.2
Using rex-powershell 0.1.94
Using aws-sdk-ec2 1.287.0
Using aws-sdk-iam 1.64.0
Using aws-sdk-kms 1.52.0
Using dnsruby 1.61.7
Using http-cookie 1.0.4
Using rspec 3.10.0
Using rubocop 1.23.0
Using rex-exploitation 0.1.28
Using faker 2.19.0
Using aws-sdk-s3 1.109.0
Using rspec-rerun 1.1.0
Using activesupport 6.1.4.4
Using faraday-httpclient 1.0.1
Using rails-dom-testing 2.0.3
Using activemodel 6.1.4.4
Using factory_bot 6.2.0
Fetching sqlite3 1.4.2
Using packetfu 1.1.13
Using faraday 1.8.0
Using xdr 3.0.2
Using sawyer 0.8.2
Using actionview 6.1.4.4
Using activerecord 6.1.4.4
Using actionpack 6.1.4.4
Using octokit 4.21.0
Using arel-helpers 2.13.0
Using railties 6.1.4.4
Using factory_bot_rails 6.2.0
Using metasploit-concern 4.0.3
Using metasploit-model 4.0.3
Using rspec-rails 5.0.2
Installing sqlite3 1.4.2 with native extensions
Installing pg 1.2.3 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/pg-1.2.3/ext
/data/data/com.termux/files/usr/bin/ruby -I
/data/data/com.termux/files/usr/lib/ruby/site_ruby/3.2.0
extconf.rb
checking for pg_config... yes
Using config values from
/data/data/com.termux/files/usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQsetSingleRowMode()... yes
checking for PQconninfo()... yes
checking for PQsslAttribute()... yes
checking for PQresultVerboseErrorMessage()... yes
checking for PQencryptPasswordConn()... yes
checking for PQresultMemorySize()... yes
checking for timegm()... yes
checking for rb_gc_adjust_memory_usage()... yes
checking for unistd.h... yes
checking for inttypes.h... yes
checking for C99 variable length arrays... yes
creating extconf.h
creating Makefile

current directory:
/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/pg-1.2.3/ext
make DESTDIR=
sitearchdir=./.gem.20230128-30273-85vnn
sitelibdir=./.gem.20230128-30273-85vnn clean

current directory:
/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/pg-1.2.3/ext
make DESTDIR=
sitearchdir=./.gem.20230128-30273-85vnn
sitelibdir=./.gem.20230128-30273-85vnn
compiling gvl_wrappers.c
compiling pg.c
compiling pg_binary_decoder.c
compiling pg_binary_encoder.c
compiling pg_coder.c
compiling pg_connection.c
pg_connection.c:1422:1: warning: a function definition
without a prototype is deprecated in all versions of C
and is not supported in C2x
[-Wdeprecated-non-prototype]
pgconn_describe_portal(self, stmt_name)
^
pg_connection.c:2052:1: warning: a function definition
without a prototype is deprecated in all versions of C
and is not supported in C2x
[-Wdeprecated-non-prototype]
pgconn_consume_input(self)
^
pg_connection.c:2074:1: warning: a function definition
without a prototype is deprecated in all versions of C
and is not supported in C2x
[-Wdeprecated-non-prototype]
pgconn_is_busy(self)
^
pg_connection.c:2097:1: warning: a function definition
without a prototype is deprecated in all versions of C
and is not supported in C2x
[-Wdeprecated-non-prototype]
pgconn_setnonblocking(self, state)
^
pg_connection.c:2127:1: warning: a function definition
without a prototype is deprecated in all versions of C
and is not supported in C2x
[-Wdeprecated-non-prototype]
pgconn_isnonblocking(self)
^
pg_connection.c:2144:1: warning: a function definition
without a prototype is deprecated in all versions of C
and is not supported in C2x
[-Wdeprecated-non-prototype]
pgconn_flush(self)
^
6 warnings generated.
compiling pg_copy_coder.c
compiling pg_errors.c
compiling pg_record_coder.c
compiling pg_result.c
pg_result.c:1590:58: error: use of undeclared
identifier 'rb_cData'
rb_cPGresult = rb_define_class_under( rb_mPG,
"Result", rb_cData );
^
1 error generated.
make: *** [Makefile:248: pg_result.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/pg-1.2.3
for inspection.
Results logged to
/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/arm-linux-androideabi/3.2.0/pg-1.2.3/gem_make.out

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

In Gemfile:
metasploit-framework was resolved to 6.1.21, which
depends on
metasploit-credential was resolved to 5.0.5, which
depends on
metasploit_data_models was resolved to 5.0.4,
which depends on
pg

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/sqlite3-1.4.2/ext/sqlite3
/data/data/com.termux/files/usr/bin/ruby -I
/data/data/com.termux/files/usr/lib/ruby/site_ruby/3.2.0
extconf.rb
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... yes
checking for -ldl... yes
checking for sqlite3_libversion_number() in
-lsqlite3... yes
checking for rb_proc_arity()... yes
checking for rb_integer_pack()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... yes
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
checking for sqlite3_open_v2()... yes
checking for sqlite3_prepare_v2()... yes
checking for sqlite3_int64 in sqlite3.h... yes
checking for sqlite3_uint64 in sqlite3.h... yes
creating Makefile

current directory:
/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sqlite3-1.4.2/ext/sqlite3
make DESTDIR=
sitearchdir=./.gem.20230128-30273-x2lfyc
sitelibdir=./.gem.20230128-30273-x2lfyc clean

current directory:
/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sqlite3-1.4.2/ext/sqlite3
make DESTDIR=
sitearchdir=./.gem.20230128-30273-x2lfyc
sitelibdir=./.gem.20230128-30273-x2lfyc
compiling aggregator.c
compiling backup.c
compiling database.c
database.c:38:9: warning: unused variable 'flags'
[-Wunused-variable]
VALUE flags;
^
database.c:726:57: warning: incompatible function
pointer types passing 'int (VALUE, int, char **, char
**)' (aka 'int (unsigned long, int, char **, char
**)') to parameter of type 'int (*)(void , int, char
, char )' [-Wincompatible-function-pointer-types]
status = sqlite3_exec(ctx->db,
StringValuePtr(sql), hash_callback_function,
callback_ary, &errMsg);
^~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/sqlite3.h:428:9:
note: passing argument to parameter 'callback' here
int (callback)(void,int,char,char
), /

Callback function */
^
database.c:726:81: error: incompatible integer to
pointer conversion passing 'VALUE' (aka 'unsigned
long') to parameter of type 'void *'
[-Wint-conversion]
status = sqlite3_exec(ctx->db,
StringValuePtr(sql), hash_callback_function,
callback_ary, &errMsg);
^~~~~~~~~~~~
/data/data/com.termux/files/usr/include/sqlite3.h:429:9:
note: passing argument to parameter here
void , / 1st
argument to callback /
^
database.c:728:57: warning: incompatible function
pointer types passing 'int (VALUE, int, char **, char
**)' (aka 'int (unsigned long, int, char **, char
**)') to parameter of type 'int (
)(void , int, char
, char )' [-Wincompatible-function-pointer-types]
status = sqlite3_exec(ctx->db,
StringValuePtr(sql), regular_callback_function,
callback_ary, &errMsg);
^~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/sqlite3.h:428:9:
note: passing argument to parameter 'callback' here
int (callback)(void,int,char,char
), /

Callback function */
^
database.c:728:84: error: incompatible integer to
pointer conversion passing 'VALUE' (aka 'unsigned
long') to parameter of type 'void *'
[-Wint-conversion]
status = sqlite3_exec(ctx->db,
StringValuePtr(sql), regular_callback_function,
callback_ary, &errMsg);
^~~~~~~~~~~~
/data/data/com.termux/files/usr/include/sqlite3.h:429:9:
note: passing argument to parameter here
void , / 1st
argument to callback */
^
3 warnings and 2 errors generated.
make: *** [Makefile:248: database.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/sqlite3-1.4.2
for inspection.
Results logged to
/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/arm-linux-androideabi/3.2.0/sqlite3-1.4.2/gem_make.out

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

In Gemfile:
metasploit-framework was resolved to 6.1.21, which
depends on
sqlite3
Gems installed
Creating database
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 --:--:--100 162 100 162 0 0 164 0 --:--:-- --:--:-- --:--:-- 164
2023-01-28 16:03:04.037 IST [23617] LOG: received fast shutdown request
2023-01-28 16:03:04.047 IST [23617] LOG: aborting any active transactions
2023-01-28 16:03:04.067 IST [23617] LOG: background worker "logical replication launcher" (PID 23625) exited with exit code 1
2023-01-28 16:03:04.069 IST [23620] LOG: shutting down
2023-01-28 16:03:04.073 IST [23620] LOG: checkpoint starting: shutdown immediate
2023-01-28 16:03:04.121 IST [23620] LOG: checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.016 s, sync=0.001 s, total=0.052 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=0 kB
2023-01-28 16:03:04.151 IST [23617] LOG: database system is shut down
2023-01-28 16:03:04.560 IST [2540] LOG: starting PostgreSQL 15.1 on arm-unknown-linux-androideabi, compiled by Android (8490178, based on r450784d) clang version 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6), 32-bit
2023-01-28 16:03:04.563 IST [2540] LOG: listening on IPv4 address "127.0.0.1", port 5432
2023-01-28 16:03:04.570 IST [2540] LOG: listening on Unix socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432"
2023-01-28 16:03:04.594 IST [2545] LOG: database system was shut down at 2023-01-28 16:03:04 IST
2023-01-28 16:03:04.636 IST [2540] LOG: database system is ready to accept connections
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to open the file msfconsole: No such file or directory
100 296 100 296 0 0 303 0 --:--:-- --:--:-- --:--:-- 303
curl: (23) Failure writing output to destination
you can directly use msfvenom or msfconsole rather than ./msfvenom or ./msfconsole.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions