An error occurred while installing pcaprub (0.12.4), and Bundler cannot
continue.
Make sure that `gem install pcaprub -v '0.12.4'` succeeds before bundling.
This occurs during the installation process for Bundled Gems in Metasploit and within its local Git repository, e.g.:
cd ~/git/metasploit-framework/
bundle install
Note, ~/git/metasploit-framework/
is my locally defined directory for my Github repository in Kali Linux.
In the top example (see above), the error effects the “pcaprub” Gem. To fix this issue, run the following command:
sudo apt-get install libpcap-dev
This will install the package for libpcap-dev (development library for libpcap) – libpcap-dev Debian package
Once the libpcap-dev package has been installed, the bundle install command can be ran:
cd ~/git/metasploit-framework/
bundle install
Note, for other Gem installation errors during bundle install, it is likely to be an issue with missing packages in your system. The missing packages can be installed via sudo apt-get install [package_name]
.