Results 1 to 4 of 4

Thread: Metasploit broke after attempting to update

  1. #1
    Join Date
    2016-Sep
    Posts
    3

    Metasploit broke after attempting to update

    So I tried to update Metasploit by trying msfupdate, and I got this
    Code:
    [*][*] Attempting to update the Metasploit Framework...[*]
    [*] Checking for updates via the APT repository[*] Note: expect weekly(ish) updates using this method
    W: The repository 'http://security.kali.org/kali-security kali/updates Release' does not have a Release file.
    W: The repository 'http://http.kali.org /kali Release' does not have a Release file.
    W: The repository 'http://http.kali.org /wheezy Release' does not have a Release file.
    W: The repository 'http://http.kali.org/kali kali Release' does not have a Release file.
    W: Failed to fetch http://security.kali.org/kali-security/dists/kali/updates/main/source/Sources  404  Not Found
    W: Failed to fetch http://security.kali.org/kali-security/dists/kali/updates/contrib/source/Sources  404  Not Found
    W: Failed to fetch http://security.kali.org/kali-security/dists/kali/updates/non-fr$/source/Sources  404  Not Found
    W: Failed to fetch http://security.kali.org/kali-security/dists/kali/updates/main/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://security.kali.org/kali-security/dists/kali/updates/contrib/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://http.kali.org/dists//kali/main/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://http.kali.org/dists//kali/contrib/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://http.kali.org/dists//kali/non-free/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://http.kali.org/dists//wheezy/main/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://http.kali.org/dists//wheezy/contrib/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://http.kali.org/dists//wheezy/non-free/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://http.kali.org/kali/dists/kali/main/source/Sources  404  Not Found
    W: Failed to fetch http://http.kali.org/kali/dists/kali/contrib/source/Sources  404  Not Found
    W: Failed to fetch http://http.kali.org/kali/dists/kali/non-free/source/Sources  404  Not Found
    W: Failed to fetch http://http.kali.org/kali/dists/kali/main/binary-i386/Packages  404  Not Found
    W: Failed to fetch http://http.kali.org/kali/dists/kali/contrib/binary-i386/Packages  404  Not Found
    E: Some index files failed to download. They have been ignored, or old ones used instead.[*] No updates available
    After that, msfconsole wasn't even starting anymore and I just got this error message and I got this
    Code:
    Could not find pg-0.18.4 in any of the sources
    Run `bundle install` to install missing gems.
    So I was researching the problem as someone said to CD /usr/share/metasploit-framework# and bundle install from there and I got this error message instead.
    Code:
    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.
    Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
    Fetching gem metadata from https://rubygems.org/.......
    Fetching version metadata from https://rubygems.org/...
    Fetching dependency metadata from https://rubygems.org/..
    Using rake 11.2.2
    Using i18n 0.7.0
    Using json 1.8.3
    Using minitest 5.9.0
    Using thread_safe 0.3.5
    Using tzinfo 1.2.2
    Using activesupport 4.2.7.1
    Using builder 3.2.2
    Using erubis 2.7.0
    Using mini_portile2 2.1.0
    Using pkg-config 1.1.7
    Installing nokogiri 1.6.8 with native extensions
    Installing rails-deprecated_sanitizer 1.0.3
    Installing rails-dom-testing 1.0.7
    Installing loofah 2.0.3
    Installing rails-html-sanitizer 1.0.3
    Installing actionview 4.2.7.1
    Installing rack 1.6.4
    Installing rack-test 0.6.3
    Installing actionpack 4.2.7.1
    Installing activemodel 4.2.7.1
    Installing arel 6.0.3
    Installing activerecord 4.2.7.1
    Installing addressable 2.4.0
    Installing arel-helpers 2.3.0
    Installing bcrypt 3.1.11 with native extensions
    Installing bit-struct 0.15.0
    Installing docile 1.1.5
    Installing multipart-post 2.0.0
    Installing faraday 0.9.2
    Installing filesize 0.1.1
    Installing rkelly-remix 0.0.6
    Installing jsobfu 0.4.1
    Installing metasm 1.0.2
    Installing thor 0.19.1
    Installing railties 4.2.7.1
    Installing metasploit-concern 2.0.1
    Installing metasploit-model 2.0.0
    Installing pg 0.18.4 with native extensions
    
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    
        /usr/bin/ruby2.2 -r ./siteconf20160928-17291-qhqtxb.rb extconf.rb
    checking for pg_config... yes
    Using config values from /usr/bin/pg_config
    You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
    You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
    checking for libpq-fe.h... no
    Can't find the 'libpq-fe.h header
    *** 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.2
    	--with-pg
    	--without-pg
    	--enable-windows-cross
    	--disable-windows-cross
    	--with-pg-config
    	--without-pg-config
    	--with-pg_config
    	--without-pg_config
    	--with-pg-dir
    	--without-pg-dir
    	--with-pg-include
    	--without-pg-include=${pg-dir}/include
    	--with-pg-lib
    	--without-pg-lib=${pg-dir}/lib
    
    extconf failed, exit code 1
    
    Gem files will remain installed in /usr/share/metasploit-framework/vendor/bundle/ruby/2.2.0/gems/pg-0.18.4 for inspection.
    Results logged to /usr/share/metasploit-framework/vendor/bundle/ruby/2.2.0/extensions/x86-linux/2.2.0/pg-0.18.4/gem_make.out
    An error occurred while installing pg (0.18.4), and Bundler cannot continue.
    Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
    root@Chicago:/usr/share/metasploit-framework# bundle
    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.
    Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
    Fetching gem metadata from https://rubygems.org/.......
    Fetching version metadata from https://rubygems.org/...
    Fetching dependency metadata from https://rubygems.org/..
    Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
    Using rake 11.2.2
    Using i18n 0.7.0
    Using json 1.8.3
    Using minitest 5.9.0
    Using thread_safe 0.3.5
    Using tzinfo 1.2.2
    Using activesupport 4.2.7.1
    Using builder 3.2.2
    Using erubis 2.7.0
    Using mini_portile2 2.1.0
    Using pkg-config 1.1.7
    Using nokogiri 1.6.8
    Using rails-deprecated_sanitizer 1.0.3
    Using rails-dom-testing 1.0.7
    Using loofah 2.0.3
    Using rails-html-sanitizer 1.0.3
    Using actionview 4.2.7.1
    Using rack 1.6.4
    Using rack-test 0.6.3
    Using actionpack 4.2.7.1
    Using activemodel 4.2.7.1
    Using arel 6.0.3
    Using activerecord 4.2.7.1
    Using addressable 2.4.0
    Using arel-helpers 2.3.0
    Using bcrypt 3.1.11
    Using bit-struct 0.15.0
    Using docile 1.1.5
    Using multipart-post 2.0.0
    Using faraday 0.9.2
    Using filesize 0.1.1
    Using rkelly-remix 0.0.6
    Using jsobfu 0.4.1
    Using metasm 1.0.2
    Using thor 0.19.1
    Using railties 4.2.7.1
    Using metasploit-concern 2.0.1
    Using metasploit-model 2.0.0
    Installing pg 0.18.4 with native extensions
    
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    
        /usr/bin/ruby2.2 -r ./siteconf20160928-16273-1xm271q.rb extconf.rb
    checking for pg_config... yes
    Using config values from /usr/bin/pg_config
    You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
    You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
    checking for libpq-fe.h... no
    Can't find the 'libpq-fe.h header
    *** 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.2
    	--with-pg
    	--without-pg
    	--enable-windows-cross
    	--disable-windows-cross
    	--with-pg-config
    	--without-pg-config
    	--with-pg_config
    	--without-pg_config
    	--with-pg-dir
    	--without-pg-dir
    	--with-pg-include
    	--without-pg-include=${pg-dir}/include
    	--with-pg-lib
    	--without-pg-lib=${pg-dir}/lib
    
    extconf failed, exit code 1
    
    Gem files will remain installed in /usr/share/metasploit-framework/vendor/bundle/ruby/2.2.0/gems/pg-0.18.4 for inspection.
    Results logged to /usr/share/metasploit-framework/vendor/bundle/ruby/2.2.0/extensions/x86-linux/2.2.0/pg-0.18.4/gem_make.out
    An error occurred while installing pg (0.18.4), and Bundler cannot continue.
    Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
    I tried apt-get update & upgrade but those didn't do help.
    I'm running Linux Kali 32 bit version 3.18.2 with 16 GB.
    Is there any solution to this? I didn't install Kali just so I can deal with errors.

  2. #2
    Join Date
    2013-Apr
    Location
    Kali forums
    Posts
    805
    I think the best bet is to uninstall MSF, and reinstall. That should fix the broken dependencies

  3. #3
    Join Date
    2016-Sep
    Posts
    3
    I tried
    apt-get install metasploit-framework
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
    libadns1 python-adns python-easygui python-levenshtein python-metaconfig
    u3-tool
    Use 'apt autoremove' to remove them.
    Suggested packages:
    clamav clamav-daemon
    The following NEW packages will be installed:
    metasploit-framework
    0 upgraded, 1 newly installed, 0 to remove and 1698 not upgraded.
    1 not fully installed or removed.
    Need to get 0 B/64.4 MB of archives.
    After this operation, 179 MB of additional disk space will be used.
    Selecting previously unselected package metasploit-framework.
    (Reading database ... 288980 files and directories currently installed.)
    Preparing to unpack .../metasploit-framework_4.12.28-0kali1_i386.deb ...
    Unpacking metasploit-framework (4.12.28-0kali1) ...
    Processing triggers for man-db (2.7.5-1) ...
    Setting up dradis (3.1.0~rc2+git20160609-0kali2) ...
    Warning: The home dir /var/lib/dradis you specified already exists.
    The system user `dradis' already exists. Exiting.
    Could not find rake-11.2.2 in any of the sources
    Run `bundle install` to install missing gems.
    dpkg: error processing package dradis (--configure):
    subprocess installed post-installation script returned error exit status 7
    Setting up metasploit-framework (4.12.28-0kali1) ...
    update-alternatives: using /usr/share/metasploit-framework/msfconsole to provide /usr/bin/msfconsole (msfconsole) in auto mode
    update-alternatives: using /usr/share/metasploit-framework/msfd to provide /usr/bin/msfd (msfd) in auto mode
    update-alternatives: using /usr/share/metasploit-framework/msfdb to provide /usr/bin/msfdb (msfdb) in auto mode
    update-alternatives: using /usr/share/metasploit-framework/msfrpc to provide /usr/bin/msfrpc (msfrpc) in auto mode
    update-alternatives: using /usr/share/metasploit-framework/msfrpcd to provide /usr/bin/msfrpcd (msfrpcd) in auto mode
    update-alternatives: using /usr/share/metasploit-framework/msfupdate to provide /usr/bin/msfupdate (msfupdate) in auto mode
    update-alternatives: using /usr/share/metasploit-framework/msfvenom to provide /usr/bin/msfvenom (msfvenom) in auto mode
    Errors were encountered while processing:
    dradis
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    and I'm still getting the same error with "Could not find pg-0.18.4 in any of the sources" when I try to start Metasploit.

  4. #4
    Join Date
    2013-Apr
    Location
    Kali forums
    Posts
    805
    Yuck I hate to say it, but if I'm faced with this kind of thing, I usually reinstall Kali.

Similar Threads

  1. Broke my apt-get doing update
    By maxime_vhw in forum NetHunter General Questions
    Replies: 0
    Last Post: 2022-04-22, 00:27
  2. Issue while attempting to update
    By script in forum TroubleShooting Archive
    Replies: 5
    Last Post: 2017-01-04, 08:35
  3. Update broke armitage/metasploit
    By R1v3r in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2015-06-29, 23:18
  4. Update this morning broke something?
    By 11552 in forum TroubleShooting Archive
    Replies: 10
    Last Post: 2014-04-09, 22:17
  5. Metasploit Broke with Update.
    By Malachai in forum General Archive
    Replies: 10
    Last Post: 2014-02-04, 18:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •