/ troubleshooting

msfconsole Troubleshooting and Install 'Instant Client SDK' on Kali/Ubuntu (Debian)

Issue #1

You may hit this error sometimes when executing msfconsole (usually after update metasploit)

You must use Bundler 2 or greater with this lockfile.

Solution #1

Following this post.

# Install gem 3.2.0 from source (3.0.6, 3.1.2 proved not working)
git clone https://github.com/rubygems/rubygems
cd rubygems
ruby setup.rb

# Then repair ruby env
apt install ruby-dev -y
apt install libpq-dev libpcap-dev libsqlite3-dev -y
cd /usr/share/metasploit-framework/
sed -i 's#https://rubygems.org#https://gems.ruby-china.com#' Gemfile
bundler install --no-deployment
gem install json -v '2.3.0'

If things going right,the msf should be working not.

Issue #2

BUT, You may hit this error in the bundler install step:

Error Message:
  '/usr/include/oracle/19.6/client/oci.h' does not exist.
  Install 'Instant Client SDK'.

Solution #2

Found this comment:
https://github.com/laurenz/oracle_fdw/issues/154#issuecomment-286784779
Which is pretty clear what we should do:

apt-get install oracle-instantclient-devel

Then try it again

gem install ruby-oci8 -v '2.2.8' --source 'https://mirrors.tuna.tsinghua.edu.cn/rubygems/'

It should be working now.

msfconsole Troubleshooting and Install 'Instant Client SDK' on Kali/Ubuntu (Debian)
Share this