Sample Header Ad - 728x90

Gem install producing "OpenSSL" error

4 votes
1 answer
3860 views
For at least a week now i have been trying to install Bettercap on my Raspberry PI using gem but whenever i type in: sudo gem install bettercap i receive an error message that says ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources Every fix that has been suggested to other people yields no results: **Option 1: "http option"** According to the answer by Filippo De Bortoli in this thread on the same issue, disabling the https protocol will solve it. However after running these commands: gem source -r https://rubygems.org/ gem source -a http://rubygems.org/ I still get this error: ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources **Option 2: rebuild** As suggested by Filippo De Bortoli in the same thread he reinstalled ruby after installing OpenSSL, however my raspbian came with OpenSSL and running sudo apt-get install openssl only confirms i have the latest version. I have also re-built ruby 3 times since i started getting this. **Option 3: install locally** After finding out that you could install the gems locally i installed the source and ran. sudo gem install --local bettercap-1.6.2b.gem and got the output: ERROR: Could not find a valid gem 'em-proxy' (>= 0.1.8, ~> 0.1) in any repository I am guessing since it is only searching the local disk it can not find the dependencies it needs, so i decided to locally install "em-proxy" only to find it needed dependencies, which also needed dependencies. Great. So i decided to leave it for the sake of my sanity and it was overall impractical. ---------- To wrap up, **how do i get rid of this error or at the very least bypass it?** Just in case you wanted to know here is the output of gem -v: 2.4.5 and the output of ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [armv6l-linux-eabihf]
Asked by aidan (41 rep)
Jul 29, 2017, 08:37 PM
Last activity: Jun 19, 2025, 02:06 AM