rapid7 / metasploit-framework

Metasploit Framework
https://www.metasploit.com/
Other
34k stars 13.94k forks source link

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

Closed vollh4rD closed 4 years ago

vollh4rD commented 4 years ago

I tried running this command :

pi@raspberrypi:/opt/metasploit-framework $ bundle install
Fetching gem metadata from https://rubygems.org/...........
Using rake 13.0.1
Following files may not be writable, so sudo is needed:
  /usr/local/bin
  /var/lib/gems/2.5.0
  /var/lib/gems/2.5.0/build_info
  /var/lib/gems/2.5.0/cache
  /var/lib/gems/2.5.0/doc
  /var/lib/gems/2.5.0/extensions
  /var/lib/gems/2.5.0/gems
  /var/lib/gems/2.5.0/specifications
Using Ascii85 1.0.3
Using concurrent-ruby 1.0.5
Using i18n 0.9.5
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using activesupport 4.2.11.1
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.5.0
Using rails-html-sanitizer 1.3.0
Using actionview 4.2.11.1
Using rack 1.6.13
Using rack-test 0.6.3
Using actionpack 4.2.11.1
Using activemodel 4.2.11.1
Using arel 6.0.4
Using activerecord 4.2.11.1
Using public_suffix 4.0.4
Using addressable 2.7.0
Using afm 0.2.2
Using arel-helpers 2.11.0
Using ast 2.4.0
Using aws-eventstream 1.1.0
Using aws-partitions 1.296.0
Using aws-sigv4 1.1.1
Using jmespath 1.4.0
Using aws-sdk-core 3.94.0
Using aws-sdk-ec2 1.152.0
Using aws-sdk-iam 1.35.0
Using aws-sdk-kms 1.30.0
Using aws-sdk-s3 1.61.2
Using bcrypt 3.1.12
Using bcrypt_pbkdf 1.0.1
Using bindata 2.4.7
Using bit-struct 0.16
Using bson 4.8.2
Using bundler 1.17.3
Using byebug 11.1.1
Using coderay 1.1.2
Using cookiejar 0.3.3
Using daemons 1.3.1
Using diff-lcs 1.3
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.5
Using factory_bot 5.1.2
Using thor 1.0.1
Using railties 4.2.11.1
Using factory_bot_rails 5.1.1
Using faker 2.2.1
Using multipart-post 2.1.1
Using faraday 1.0.1
Using websocket-extensions 0.1.4
Using websocket-driver 0.7.1
Using faye-websocket 0.10.9
Using filesize 0.2.0
Using fivemat 1.3.7
Using hashery 2.1.2
Using hrr_rb_ssh 0.3.0.pre2
Using jaro_winkler 1.5.4
Using rkelly-remix 0.0.7
Using jsobfu 0.4.2
Using json 2.3.0
Using memory_profiler 0.9.14
Using metasm 1.0.4
Using metasploit-concern 2.0.5
Using metasploit-model 2.0.4
Using pg 0.21.0
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.7
Installing recog 2.3.7
Fetching metasploit_data_models 3.0.10
Installing metasploit_data_models 3.0.10
Fetching net-ssh 5.2.0
Installing net-ssh 5.2.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
Fetching rubyzip 2.3.0
Installing rubyzip 2.3.0
Fetching metasploit-credential 3.0.4
Installing metasploit-credential 3.0.4
Fetching metasploit-payloads 1.3.91
Installing metasploit-payloads 1.3.91
Fetching metasploit_payloads-mettle 0.5.21
Installing metasploit_payloads-mettle 0.5.21
Fetching mqtt 0.5.0
Installing mqtt 0.5.0
Fetching msgpack 1.3.3
Installing msgpack 1.3.3 with native extensions
Fetching nessus_rest 0.1.6
Installing nessus_rest 0.1.6
Fetching network_interface 0.0.2
Installing network_interface 0.0.2 with native extensions
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
Fetching pcaprub 0.13.0
Installing pcaprub 0.13.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /tmp/bundler20200418-24876-lqw1aipcaprub-0.13.0/gems/pcaprub-0.13.0/ext/pcaprub_c
/usr/bin/ruby2.5 -r ./siteconf20200418-24876-1cz77a0.rb extconf.rb

[*] Running checks for pcaprub_c code...
platform is arm-linux-gnueabihf
checking for ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl()... yes
checking for pcap_open_live() in -lpcap... no
checking for pcap_setnonblock() in -lpcap... no
creating Makefile

current directory: /tmp/bundler20200418-24876-lqw1aipcaprub-0.13.0/gems/pcaprub-0.13.0/ext/pcaprub_c
make "DESTDIR=" clean

current directory: /tmp/bundler20200418-24876-lqw1aipcaprub-0.13.0/gems/pcaprub-0.13.0/ext/pcaprub_c
make "DESTDIR="
compiling pcaprub.c
pcaprub.c:11:10: fatal error: pcap.h: No such file or directory
 #include <pcap.h>
          ^~~~~~~~
compilation terminated.
make: *** [Makefile:243: pcaprub.o] Error 1

make failed, exit code 2

Gem files will remain installed in /tmp/bundler20200418-24876-lqw1aipcaprub-0.13.0/gems/pcaprub-0.13.0 for inspection.
Results logged to /tmp/bundler20200418-24876-lqw1aipcaprub-0.13.0/extensions/arm-linux/2.5.0/pcaprub-0.13.0/gem_make.out

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

In Gemfile:
  metasploit-framework was resolved to 5.0.86, which depends on
    packetfu was resolved to 1.1.13, which depends on
      pcaprub

so i did this but ,

 pi@raspberrypi:/opt/metasploit-framework $ sudo gem install pcaprub -v '0.13.0' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR:  Error installing pcaprub:
    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/pcaprub-0.13.0/ext/pcaprub_c
/usr/bin/ruby2.5 -r ./siteconf20200418-26215-xfcczp.rb extconf.rb

[*] Running checks for pcaprub_c code...
platform is arm-linux-gnueabihf
checking for ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl()... yes
checking for pcap_open_live() in -lpcap... no
checking for pcap_setnonblock() in -lpcap... no
creating Makefile

current directory: /var/lib/gems/2.5.0/gems/pcaprub-0.13.0/ext/pcaprub_c
make "DESTDIR=" clean

current directory: /var/lib/gems/2.5.0/gems/pcaprub-0.13.0/ext/pcaprub_c
make "DESTDIR="
compiling pcaprub.c
pcaprub.c:11:10: fatal error: pcap.h: No such file or directory
 #include <pcap.h>
          ^~~~~~~~
compilation terminated.
make: *** [Makefile:243: pcaprub.o] Error 1

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/2.5.0/gems/pcaprub-0.13.0 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/arm-linux/2.5.0/pcaprub-0.13.0/gem_make.out

it still didnt work can anyone help me .....????

bcoles commented 4 years ago

You'll likely need operating system packages. Either libpcap-dev or libpcap-devel.

apt-get install libpcap-dev

or

yum install libpcap-devel
vollh4rD commented 4 years ago

yeah

You'll likely need operating system packages. Either libpcap-dev or libpcap-devel.

apt-get install libpcap-dev

or

yum install libpcap-devel

yeah thanks it works now