rapid7 / metasploit-framework

Metasploit Framework
https://www.metasploit.com/
Other
33.76k stars 13.89k forks source link

problem still exist #13814

Closed azamet90 closed 4 years ago

azamet90 commented 4 years ago
msfconsole
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      reline (>= 0)
      Available/installed versions of this gem:
      - 0.1.3
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.

                 _---------.
             .' #######   ;."
  .---,.    ;@             @@`;   .---,..
." @@@@@'.,'@@            @@@@@',.'@@@@ ".
'-.@@@@@@@@@@@@@          @@@@@@@@@@@@@ @;
   `.@@@@@@@@@@@@        @@@@@@@@@@@@@@ .'
     "--'.@@@  -.@        @ ,'-   .'--"
          ".@' ; @       @ `.  ;'
            |@@@@ @@@     @    .
             ' @@@ @@   @@    ,                                                                                                                                                    
              `.@@@@    @@   .                                                                                                                                                     
                ',@@     @   ;           _____________                                                                                                                             
                 (   3 C    )     /|___ / Metasploit! \                                                                                                                            
                 ;@'. __*__,."    \|--- \_____________/                                                                                                                            
                  '(.,...."/                                                                                                                                                       

       =[ metasploit v5.0.96-dev                          ]                                                                                                                        
+ -- --=[ 2041 exploits - 1104 auxiliary - 344 post       ]
+ -- --=[ 562 payloads - 45 encoders - 10 nops            ]
+ -- --=[ 7 evasion                                       ]

Metasploit tip: When in a module, use back to go back to the top level prompt

msf5 > 
bcoles commented 4 years ago

what problem are you encountering

azamet90 commented 4 years ago

what problem are you encountering

**WARN: Unresolved or ambiguous specs during Gem::Specification.reset: reline (>= 0) Available/installed versions of this gem:

gwillcox-r7 commented 4 years ago

@azamet90 Follow the directions and run gem cleanup reline. You probably have multiple versions of the reline gem installed somehow.

azamet90 commented 4 years ago

@azamet90 Follow the directions and run gem cleanup reline. You probably have multiple versions of the reline gem installed somehow.

pip cleanup reline && pip3 cleanup reline && sudo pip cleanup reline && sudo pip3 cleanup reline
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip uninstall reline && pip3 uninstall reline && sudo pip uninstall reline && sudo pip3 uninstall relince
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: Skipping reline as it is not installed.
WARNING: Skipping reline as it is not installed.
[sudo] password for azamet: 
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support                                                                                      
WARNING: Skipping reline as it is not installed.
WARNING: Skipping relince as it is not installed.

problem still exist :D

gwillcox-r7 commented 4 years ago

@azamet90 You do realize Metasploit Framework is based off of Ruby, not Python right? The commands you executed are for Python and will not effect your Metasploit Framework install at all. Please execute gem cleanup reline.

azamet90 commented 4 years ago

@azamet90 You do realize Metasploit Framework is based off of Ruby, not Python right? The commands you executed are for Python and will not effect your Metasploit Framework install at all. Please execute gem cleanup reline.

yeah sorry my bad and mistake but i did it before and same result


gem cleanup reline && sudo gem cleanup reline
Cleaning up installed gems...
Clean up complete
Cleaning up installed gems...
Clean up complete
 azamet@MrRobots  ~  msfconsole
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      reline (>= 0)
      Available/installed versions of this gem:
      - 0.1.3
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
^C
Aborting...
 ✘ azamet@MrRobots  ~  
gwillcox-r7 commented 4 years ago

@azamet90 Try this:

Inside your Gemfile.lock file, change the line reline (0.1.3) to reline (0.1.4) and then do bundle install. This should upgrade your reline install to 0.1.4. I think I had a similar issue in the past where for some reason reline 0.1.3 was causing issues but upgrading fixed this confusion.

Let me know if that still doesn't work.

azamet90 commented 4 years ago

@azamet90 Try this:

Inside your Gemfile.lock file, change the line reline (0.1.3) to reline (0.1.4) and then do bundle install. This should upgrade your reline install to 0.1.4. I think I had a similar issue in the past where for some reason reline 0.1.3 was causing issues but upgrading fixed this confusion.

Let me know if that still doesn't work.

locate Gemfile.lock
/home/azamet/.vim_runtime/sources_non_forked/vim-multiple-cursors/Gemfile.lock
/home/azamet/.vim_runtime/sources_non_forked/vim-ruby/Gemfile.lock
/home/azamet/.vim_runtime/sources_non_forked/vim-yankstack/Gemfile.lock
/opt/xerosploit/tools/bettercap/Gemfile.lock
/usr/lib/dradis/Gemfile.lock
/usr/lib/dradis/ruby/2.7.0/gems/bcrypt-3.1.12/Gemfile.lock
/usr/lib/dradis/ruby/2.7.0/gems/blankslate-3.1.3/Gemfile.lock
/usr/lib/dradis/ruby/2.7.0/gems/multipart-post-1.2.0/Gemfile.lock
/usr/lib/dradis/ruby/2.7.0/gems/resque-status-0.5.0/Gemfile.lock
/usr/lib/dradis/ruby/2.7.0/gems/warden-1.2.8/Gemfile.lock
/usr/share/doc/ruby-async-http/examples/fetch/Gemfile.lock
/usr/share/metasploit-framework/Gemfile.lock
/usr/share/metasploit-framework/vendor/bundle/ruby/2.7.0/gems/bcrypt-3.1.12/Gemfile.lock
/usr/share/metasploit-framework/vendor/bundle/ruby/2.7.0/gems/bcrypt_pbkdf-1.0.1/Gemfile.lock
/usr/share/metasploit-framework/vendor/bundle/ruby/2.7.0/gems/http_parser.rb-0.6.0/Gemfile.lock
/usr/share/metasploit-framework/vendor/bundle/ruby/2.7.0/gems/network_interface-0.0.2/Gemfile.lock
/usr/share/metasploit-framework/vendor/bundle/ruby/2.7.0/gems/nexpose-7.2.1/Gemfile.lock
/usr/share/metasploit-framework/vendor/bundle/ruby/2.7.0/gems/rack-test-0.6.3/Gemfile.lock
/usr/share/metasploit-framework/vendor/bundle/ruby/2.7.0/gems/simplecov-html-0.12.2/Gemfile.lock
/var/lib/gems/2.7.0/gems/async-http-0.52.4/examples/fetch/Gemfile.lock
/var/lib/gems/2.7.0/gems/em-proxy-0.1.9/Gemfile.lock
/var/lib/gems/2.7.0/gems/network_interface-0.0.2/Gemfile.lock
/var/lib/gems/2.7.0/gems/puppet-6.16.0/Gemfile.lock
/var/lib/gems/2.7.0/gems/qr4r-0.4.1/Gemfile.lock
/var/lib/gems/2.7.0/gems/rqrcode_core-0.1.2/Gemfile.lock
/var/lib/gems/2.7.0/gems/rubygems-update-3.1.4/Gemfile.lock

sorry for late answer and thanks for your help but which one of them i should modify?

bcoles commented 4 years ago

sorry for late answer and thanks for your help but which one of them i should modify?

/usr/share/metasploit-framework/Gemfile.lock

azamet90 commented 4 years ago

sorry for late answer and thanks for your help but which one of them i should modify?

/usr/share/metasploit-framework/Gemfile.lock

@azamet90 Try this:

Inside your Gemfile.lock file, change the line reline (0.1.3) to reline (0.1.4) and then do bundle install. This should upgrade your reline install to 0.1.4. I think I had a similar issue in the past where for some reason reline 0.1.3 was causing issues but upgrading fixed this confusion.

Let me know if that still doesn't work.

sudo bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root
users on this machine.
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      reline (>= 0)
      Available/installed versions of this gem:
      - 0.1.3
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

If this is a development machine, remove the /usr/share/metasploit-framework/Gemfile freeze 
by running `bundle install --no-deployment`.

The gemspecs for path gems changed
 ✘ azamet@MrRobots  .../share/metasploit-framework  bundle install
There was an error while trying to write to `/usr/share/metasploit-framework/.bundle/config`. It is likely that you need to grant write permissions for
that path.
 ✘ azamet@MrRobots  .../share/metasploit-framework  

this is what i do get if i try to bundle install i did fixed that problem but on bundle install i catch this: Using reline 0.1.3 but i did changed it to 0.1.4 like u said? but only bundle install --no-deployment command works after changing it so i did it? what to do?

full output:


bundle install --no-deployment
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      reline (>= 0)
      Available/installed versions of this gem:
      - 0.1.4
      - 0.1.3
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 13.0.1
Following files may not be writable, so sudo is needed:
  /usr/local/bin                                                                                                                                         
  /var/lib/gems/2.7.0                                                                                                                                    
  /var/lib/gems/2.7.0/build_info                                                                                                                         
  /var/lib/gems/2.7.0/cache                                                                                                                              
  /var/lib/gems/2.7.0/doc                                                                                                                                
  /var/lib/gems/2.7.0/extensions                                                                                                                         
  /var/lib/gems/2.7.0/gems                                                                                                                               
  /var/lib/gems/2.7.0/specifications                                                                                                                     
Fetching Ascii85 1.0.3

Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password: 
Installing Ascii85 1.0.3
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching i18n 0.9.5
Installing i18n 0.9.5
Using minitest 5.14.1
Using thread_safe 0.3.6
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching activesupport 4.2.11.3
Installing activesupport 4.2.11.3
Fetching builder 3.2.4
Installing builder 3.2.4
Using erubis 2.7.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.9
Fetching rails-deprecated_sanitizer 1.0.3
Installing rails-deprecated_sanitizer 1.0.3
Fetching rails-dom-testing 1.0.9
Installing rails-dom-testing 1.0.9
Fetching crass 1.0.6
Installing crass 1.0.6
Fetching loofah 2.6.0
Installing loofah 2.6.0
Fetching rails-html-sanitizer 1.3.0
Installing rails-html-sanitizer 1.3.0
Fetching actionview 4.2.11.3
Installing actionview 4.2.11.3
Fetching rack 1.6.13
Installing rack 1.6.13
Fetching rack-test 0.6.3
Installing rack-test 0.6.3
Fetching actionpack 4.2.11.3
Installing actionpack 4.2.11.3
Fetching globalid 0.4.2
Installing globalid 0.4.2
Fetching activejob 4.2.11.3
Installing activejob 4.2.11.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching actionmailer 4.2.11.3
Installing actionmailer 4.2.11.3
Fetching activemodel 4.2.11.3
Installing activemodel 4.2.11.3
Fetching arel 6.0.4
Installing arel 6.0.4
Fetching activerecord 4.2.11.3
Installing activerecord 4.2.11.3
Using public_suffix 4.0.5
Using addressable 2.7.0
Fetching afm 0.2.2
Installing afm 0.2.2
Fetching arel-helpers 2.11.0
Installing arel-helpers 2.11.0
Fetching aws-eventstream 1.1.0
Installing aws-eventstream 1.1.0
Fetching aws-partitions 1.339.0
Installing aws-partitions 1.339.0
Fetching aws-sigv4 1.2.1
Installing aws-sigv4 1.2.1
Fetching jmespath 1.4.0
Installing jmespath 1.4.0
Fetching aws-sdk-core 3.103.0
Installing aws-sdk-core 3.103.0
Fetching aws-sdk-ec2 1.175.0
Installing aws-sdk-ec2 1.175.0
Fetching aws-sdk-iam 1.43.0
Installing aws-sdk-iam 1.43.0
Fetching aws-sdk-kms 1.36.0
Installing aws-sdk-kms 1.36.0
Fetching aws-sdk-s3 1.73.0
Installing aws-sdk-s3 1.73.0
Fetching bcrypt 3.1.12
Installing bcrypt 3.1.12 with native extensions
Fetching bcrypt_pbkdf 1.0.1
Installing bcrypt_pbkdf 1.0.1 with native extensions
Fetching bindata 2.4.7
Installing bindata 2.4.7
Fetching bit-struct 0.16
Installing bit-struct 0.16
Fetching bson 4.9.4
Installing bson 4.9.4 with native extensions
Using bundler 2.1.4
Fetching cookiejar 0.3.3
Installing cookiejar 0.3.3
Using daemons 1.3.1
Using diff-lcs 1.4.4
Fetching dnsruby 1.61.3
Installing dnsruby 1.61.3
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching ed25519 1.2.4
Installing ed25519 1.2.4 with native extensions
Using eventmachine 1.2.7
Fetching em-socksify 0.3.2
Installing em-socksify 0.3.2
Using http_parser.rb 0.6.0
Fetching em-http-request 1.1.6
Installing em-http-request 1.1.6
Fetching faker 2.2.1
Installing faker 2.2.1
Using multipart-post 2.1.1
Fetching faraday 1.0.1
Installing faraday 1.0.1
Fetching websocket-extensions 0.1.5
Installing websocket-extensions 0.1.5
Fetching websocket-driver 0.7.2
Installing websocket-driver 0.7.2 with native extensions
Fetching faye-websocket 0.10.9
Installing faye-websocket 0.10.9
Fetching filesize 0.2.0
Installing filesize 0.2.0
Fetching hashery 2.1.2
Installing hashery 2.1.2
Fetching hrr_rb_ssh 0.3.0.pre2
Installing hrr_rb_ssh 0.3.0.pre2
Using io-console 0.5.6
Using reline 0.1.3
Using irb 1.2.4
Fetching rkelly-remix 0.0.7
Installing rkelly-remix 0.0.7
Fetching jsobfu 0.4.2
Installing jsobfu 0.4.2
Using json 2.3.1
Fetching metasm 1.0.4
Installing metasm 1.0.4
Using thor 1.0.1
Fetching railties 4.2.11.3
Installing railties 4.2.11.3
Fetching metasploit-concern 2.0.5
Installing metasploit-concern 2.0.5
Fetching metasploit-model 2.0.4
Installing metasploit-model 2.0.4
Fetching pg 0.21.0
Installing pg 0.21.0 with native extensions
Fetching pg_array_parser 0.0.9
Installing pg_array_parser 0.0.9 with native extensions
Fetching postgres_ext 3.0.1
Installing postgres_ext 3.0.1
Fetching recog 2.3.8
Installing recog 2.3.8
Fetching metasploit_data_models 3.0.10
Installing metasploit_data_models 3.0.10
Fetching net-ssh 6.1.0
Installing net-ssh 6.1.0
Fetching rex-core 0.1.13
Installing rex-core 0.1.13
Fetching rex-socket 0.1.23
Installing rex-socket 0.1.23
Fetching rubyntlm 0.6.2
Installing rubyntlm 0.6.2
Using rubyzip 2.3.0
Fetching metasploit-credential 3.0.4
Installing metasploit-credential 3.0.4
Fetching metasploit-payloads 1.4.4
Installing metasploit-payloads 1.4.4
Fetching metasploit_payloads-mettle 0.5.21
Installing metasploit_payloads-mettle 0.5.21
Fetching mqtt 0.5.0
Installing mqtt 0.5.0
Using msgpack 1.3.3
Fetching nessus_rest 0.1.6
Installing nessus_rest 0.1.6
Fetching net-ldap 0.16.2
Installing net-ldap 0.16.2
Using network_interface 0.0.2
Fetching nexpose 7.2.1
Installing nexpose 7.2.1
Fetching sawyer 0.8.2
Installing sawyer 0.8.2
Fetching octokit 4.18.0
Installing octokit 4.18.0
Fetching openssl-ccm 1.2.2
Installing openssl-ccm 1.2.2
Fetching openvas-omp 0.0.4
Installing openvas-omp 0.0.4
Using pcaprub 0.13.0
Using packetfu 1.1.13
Fetching patch_finder 1.0.2
Installing patch_finder 1.0.2
Fetching ruby-rc4 0.1.5
Installing ruby-rc4 0.1.5
Fetching ttfunk 1.6.2.1
Installing ttfunk 1.6.2.1
Fetching pdf-reader 2.4.0
Installing pdf-reader 2.4.0
Fetching rails 0.9.5
Installing rails 0.9.5
Fetching rb-readline 0.5.5
Installing rb-readline 0.5.5
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching rex-text 0.2.26
Installing rex-text 0.2.26
Fetching rex-arch 0.1.13
Installing rex-arch 0.1.13
Fetching rex-struct2 0.1.2
Installing rex-struct2 0.1.2
Fetching rex-bin_tools 0.1.6
Installing rex-bin_tools 0.1.6
Fetching rex-encoder 0.1.4
Installing rex-encoder 0.1.4
Fetching rex-exploitation 0.1.24
Installing rex-exploitation 0.1.24
Fetching rex-java 0.1.5
Installing rex-java 0.1.5
Fetching rex-mime 0.1.5
Installing rex-mime 0.1.5
Fetching rex-nop 0.1.1
Installing rex-nop 0.1.1
Fetching rex-ole 0.1.6
Installing rex-ole 0.1.6
Fetching rex-random_identifier 0.1.4
Installing rex-random_identifier 0.1.4
Fetching rex-powershell 0.1.87
Installing rex-powershell 0.1.87
Fetching rex-registry 0.1.3
Installing rex-registry 0.1.3
Fetching rex-rop_builder 0.1.3
Installing rex-rop_builder 0.1.3
Fetching rex-sslscan 0.1.5
Installing rex-sslscan 0.1.5
Fetching rex-zip 0.1.3
Installing rex-zip 0.1.3
Using rspec-support 3.9.3
Using rspec-core 3.9.2
Using rspec-expectations 3.9.2
Using rspec-mocks 3.9.1
Using rspec 3.9.0
Fetching rspec-rerun 1.1.0
Installing rspec-rerun 1.1.0
Fetching ruby-macho 2.2.0
Installing ruby-macho 2.2.0
Fetching ruby-oci8 2.2.8
Installing ruby-oci8 2.2.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8
/usr/bin/ruby2.7 -I /usr/local/lib/site_ruby/2.7.0 -r ./siteconf20200710-5378-1blbp1u.rb extconf.rb
attempting to locate oracle-instantclient...
checking load library path... 
  LD_LIBRARY_PATH is not set.
  checking ld.so.conf... yes
no
  /usr/lib/oracle/19.6/client64/lib/libclntsh.so.19.1 looks like an instant client.
checking for cc... ok
checking for gcc... yes
checking for LP64... yes
checking for sys/types.h... yes
checking for ruby header... ok
*** 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=/usr/bin/$(RUBY_BASE_NAME)2.7
        --with-instant-client
        --without-instant-client
        --with-instant-client-dir
        --without-instant-client-dir
        --with-instant-client-include
        --without-instant-client-include=${instant-client-dir}/include
        --with-instant-client-lib
        --without-instant-client-lib=${instant-client-dir}/lib
        --with-sys-dir
        --without-sys-dir
        --with-sys-include
        --without-sys-include=${sys-dir}/include
        --with-sys-lib
        --without-sys-lib=${sys-dir}/lib
/tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:1041:in `initialize': RuntimeError (RuntimeError)
        from /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `new'
        from /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `get'
        from extconf.rb:22:in `<main>'
/tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:1041:in `initialize': Could not compile with Oracle instant
client. (RuntimeError)
/usr/lib/oracle/19.6/client64/lib/libclntsh.so could not be found.
You may need to make a symbolic link.
   cd /usr/lib/oracle/19.6/client64/lib
   ln -s libclntsh.so.19.1 libclntsh.so
        from /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `new'
        from /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `get'
        from extconf.rb:22:in `<main>'
---------------------------------------------------
Error Message:
  Could not compile with Oracle instant client.
  /usr/lib/oracle/19.6/client64/lib/libclntsh.so could not be found.
  You may need to make a symbolic link.
     cd /usr/lib/oracle/19.6/client64/lib
     ln -s libclntsh.so.19.1 libclntsh.so

Backtrace:
  /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:1041:in `initialize'
  /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `new'
  /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `get'
  extconf.rb:22:in `<main>'
---------------------------------------------------
See:
 * http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-full-client.md for Oracle full client
 * http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-instant-client.md for Oracle instant client
 * http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-on-osx.md for OS X
 * http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/report-installation-issue.md to report an issue.

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

  /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/extensions/x86_64-linux/2.7.0/ruby-oci8-2.2.8/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/gems/ruby-oci8-2.2.8 for inspection.
Results logged to /tmp/bundler20200710-5378-w17cv1ruby-oci8-2.2.8/extensions/x86_64-linux/2.7.0/ruby-oci8-2.2.8/gem_make.out

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

In Gemfile:
  metasploit-framework was resolved to 5.0.97, which depends on
    ruby-oci8
 ✘ azamet@MrRobots  .../share/metasploit-framework  gem install ruby-oci8
Fetching ruby-oci8-2.2.8.gem
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.7.0 directory.
 ✘ azamet@MrRobots  .../share/metasploit-framework  sudo gem install ruby-oci8
Building native extensions. This could take a while...
ERROR:  Error installing ruby-oci8:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8
/usr/bin/ruby2.7 -I /usr/local/lib/site_ruby/2.7.0 -r ./siteconf20200710-8144-76lzo9.rb extconf.rb
attempting to locate oracle-instantclient...
checking load library path... 
  LD_LIBRARY_PATH is not set.
  checking ld.so.conf... yes
no
  /usr/lib/oracle/19.6/client64/lib/libclntsh.so.19.1 looks like an instant client.
checking for cc... ok
checking for gcc... yes
checking for LP64... yes
checking for sys/types.h... yes
checking for ruby header... ok
*** 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=/usr/bin/$(RUBY_BASE_NAME)2.7
        --with-instant-client
        --without-instant-client
        --with-instant-client-dir
        --without-instant-client-dir
        --with-instant-client-include
        --without-instant-client-include=${instant-client-dir}/include
        --with-instant-client-lib
        --without-instant-client-lib=${instant-client-dir}/lib
        --with-sys-dir
        --without-sys-dir
        --with-sys-include
        --without-sys-include=${sys-dir}/include
        --with-sys-lib
        --without-sys-lib=${sys-dir}/lib
/var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:1041:in `initialize': RuntimeError (RuntimeError)
        from /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `new'
        from /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `get'
        from extconf.rb:22:in `<main>'
/var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:1041:in `initialize': Could not compile with Oracle instant client. (RuntimeError)
/usr/lib/oracle/19.6/client64/lib/libclntsh.so could not be found.
You may need to make a symbolic link.
   cd /usr/lib/oracle/19.6/client64/lib
   ln -s libclntsh.so.19.1 libclntsh.so
        from /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `new'
        from /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `get'
        from extconf.rb:22:in `<main>'
---------------------------------------------------
Error Message:
  Could not compile with Oracle instant client.
  /usr/lib/oracle/19.6/client64/lib/libclntsh.so could not be found.
  You may need to make a symbolic link.
     cd /usr/lib/oracle/19.6/client64/lib
     ln -s libclntsh.so.19.1 libclntsh.so

Backtrace:
  /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:1041:in `initialize'
  /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `new'
  /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8/ext/oci8/oraconf.rb:271:in `get'
  extconf.rb:22:in `<main>'
---------------------------------------------------
See:
 * http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-full-client.md for Oracle full client
 * http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-instant-client.md for Oracle instant client
 * http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-on-osx.md for OS X
 * http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/report-installation-issue.md to report an issue.

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

  /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ruby-oci8-2.2.8/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.7.0/gems/ruby-oci8-2.2.8 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ruby-oci8-2.2.8/gem_make.out

edit: i did make now bundle install but result is same :

bundle install
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      reline (>= 0)
      Available/installed versions of this gem:
      - 0.1.4
      - 0.1.3
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
Using rake 13.0.1
Using Ascii85 1.0.3
Using concurrent-ruby 1.0.5
Using i18n 0.9.5
Using minitest 5.14.1
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using activesupport 4.2.11.3
Using builder 3.2.4
Using erubis 2.7.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.9
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.9
Using crass 1.0.6
Using loofah 2.6.0
Using rails-html-sanitizer 1.3.0
Using actionview 4.2.11.3
Using rack 1.6.13
Using rack-test 0.6.3
Using actionpack 4.2.11.3
Using globalid 0.4.2
Using activejob 4.2.11.3
Using mini_mime 1.0.2
Using mail 2.7.1
Using actionmailer 4.2.11.3
Using activemodel 4.2.11.3
Using arel 6.0.4
Using activerecord 4.2.11.3
Using public_suffix 4.0.5
Using addressable 2.7.0
Using afm 0.2.2
Using arel-helpers 2.11.0
Using aws-eventstream 1.1.0
Using aws-partitions 1.339.0
Using aws-sigv4 1.2.1
Using jmespath 1.4.0
Using aws-sdk-core 3.103.0
Using aws-sdk-ec2 1.175.0
Using aws-sdk-iam 1.43.0
Using aws-sdk-kms 1.36.0
Using aws-sdk-s3 1.73.0
Using bcrypt 3.1.12
Using bcrypt_pbkdf 1.0.1
Using bindata 2.4.7
Using bit-struct 0.16
Using bson 4.9.4
Using bundler 2.1.4
Using cookiejar 0.3.3
Using daemons 1.3.1
Using diff-lcs 1.4.4
Using dnsruby 1.61.3
Using docile 1.3.2
Using ed25519 1.2.4
Using eventmachine 1.2.7
Using em-socksify 0.3.2
Using http_parser.rb 0.6.0
Using em-http-request 1.1.6
Using faker 2.2.1
Using multipart-post 2.1.1
Using faraday 1.0.1
Using websocket-extensions 0.1.5
Using websocket-driver 0.7.2
Using faye-websocket 0.10.9
Using filesize 0.2.0
Using hashery 2.1.2
Using hrr_rb_ssh 0.3.0.pre2
Using io-console 0.5.6
Using reline 0.1.4
Using irb 1.2.4
Using rkelly-remix 0.0.7
Using jsobfu 0.4.2
Using json 2.3.1
Using metasm 1.0.4
Using thor 1.0.1
Using railties 4.2.11.3
Using metasploit-concern 2.0.5
Using metasploit-model 2.0.4
Using pg 0.21.0
Using pg_array_parser 0.0.9
Using postgres_ext 3.0.1
Using recog 2.3.8
Using metasploit_data_models 3.0.10
Using net-ssh 6.1.0
Using rex-core 0.1.13
Using rex-socket 0.1.23
Using rubyntlm 0.6.2
Using rubyzip 2.3.0
Using metasploit-credential 3.0.4
Using metasploit-payloads 1.4.4
Using metasploit_payloads-mettle 0.5.21
Using mqtt 0.5.0
Using msgpack 1.3.3
Using nessus_rest 0.1.6
Using net-ldap 0.16.2
Using network_interface 0.0.2
Using nexpose 7.2.1
Using sawyer 0.8.2
Using octokit 4.18.0
Using openssl-ccm 1.2.2
Using openvas-omp 0.0.4
Using pcaprub 0.13.0
Using packetfu 1.1.13
Using patch_finder 1.0.2
Using ruby-rc4 0.1.5
Using ttfunk 1.6.2.1
Using pdf-reader 2.4.0
Using rails 0.9.5
Using rb-readline 0.5.5
Using redcarpet 3.5.0
Using rex-text 0.2.26
Using rex-arch 0.1.13
Using rex-struct2 0.1.2
Using rex-bin_tools 0.1.6
Using rex-encoder 0.1.4
Using rex-exploitation 0.1.24
Using rex-java 0.1.5
Using rex-mime 0.1.5
Using rex-nop 0.1.1
Using rex-ole 0.1.6
Using rex-random_identifier 0.1.4
Using rex-powershell 0.1.87
Using rex-registry 0.1.3
Using rex-rop_builder 0.1.3
Using rex-sslscan 0.1.5
Using rex-zip 0.1.3
Using rspec-support 3.9.3
Using rspec-core 3.9.2
Using rspec-expectations 3.9.2
Using rspec-mocks 3.9.1
Using rspec 3.9.0
Using rspec-rerun 1.1.0
Using ruby-macho 2.2.0
Using ruby-oci8 2.2.8
Using windows_error 0.1.2
Using ruby_smb 1.1.0
Using rack-protection 1.5.5
Using tilt 2.0.10
Using sinatra 1.4.8
Using sqlite3 1.3.13
Using sshkey 2.0.0
Using thin 1.7.2
Using tzinfo-data 1.2020.1
Using warden 1.2.7
Using xdr 2.0.0
Using xmlrpc 0.3.0
Using metasploit-framework 5.0.97 from source at `.`
Using simplecov-html 0.12.2
Using simplecov 0.18.2
Bundle complete! 17 Gemfile dependencies, 149 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into `./vendor/bundle`
gwillcox-r7 commented 4 years ago

@azamet90 Hmm so again this is not really a Metasploit issue but rather a bundler or config issue, however based on what I've seen from https://github.com/rubygems/rubygems/issues/1945 which also describes a similar situation you should be able to solve this a few different ways:

Option 1: bundle clean --force && sudo bundle clean --force, then bundle install <- Change last command to sudo bundle install if you want to run Metasploit as root at some point.

Option 2: gem uninstall reline, then choose to uninstall all versions. Then do the same with sudo gem uninstall reline

azamet90 commented 4 years ago

@azamet90 Hmm so again this is not really a Metasploit issue but rather a bundler or config issue, however based on what I've seen from rubygems/rubygems#1945 which also describes a similar situation you should be able to solve this a few different ways:

Option 1: bundle clean --force && sudo bundle clean --force, then bundle install <- Change last command to sudo bundle install if you want to run Metasploit as root at some point.

Option 2: gem uninstall reline, then choose to uninstall all versions. Then do the same with sudo gem uninstall reline

same problem still exist but if you mean it is okay to let it so then i will not feel i need to fix it... is it okay to let it just so?

gwillcox-r7 commented 4 years ago

@azamet90 Hmm so again this is not really a Metasploit issue but rather a bundler or config issue, however based on what I've seen from rubygems/rubygems#1945 which also describes a similar situation you should be able to solve this a few different ways: Option 1: bundle clean --force && sudo bundle clean --force, then bundle install <- Change last command to sudo bundle install if you want to run Metasploit as root at some point. Option 2: gem uninstall reline, then choose to uninstall all versions. Then do the same with sudo gem uninstall reline

same problem still exist but if you mean it is okay to let it so then i will not feel i need to fix it... is it okay to let it just so?

Unfortunately its a bit hard to understand what you saying but I think what you were asking here was "do I need to fix this issue for Metasploit to run successfully?" to which the answer is "no, you do not need to do so, this is a warning message, just in case something does go wrong. This does not mean that anything is currently wrong with your setup"

So yes you can feel free to ignore it, as its unlikely to cause any errors.

dwelch-r7 commented 4 years ago

Hi @azamet90 it looks like while your issue hasn't been resolved you're still able to use metasploit so I'm going to close this issue for now, please feel free to re-open this issue if it becomes a bigger problem or create a new one

Dharniesh commented 3 years ago

Hi @azamet90 I got this issue resolved, you first try changing your user to sudo, and then 1) Change your directory to metasploit-framework and change your directory to .bundle 2) Run ' bundle update --all ' command to update all your budles. 3) Then use bundle install in sudo mode. --------------------Hope This will fix------------------