ruby-on-railsrubygemsbundle-installelementary-os

Problem with Ruby Bundle Install, /usr/bin/ld: cannot find -lssl, /usr/bin/ld: cannot find -lcrypto Dradis Framework


I'm using Elementary OS and I tried to install Dradis Framework.

I followed all the steps and add some others (for example I installed Ruby 2.5.1p57) and when I ran ./setup inside dradis-ce/bin. Everything looks OK until a error message appears:

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

So I ran gem install mysql12 -v '0.5.2' and the mesage console was

can't find -ssl- lss-

I've already installed build-essential and it didn't work. I've installed MySQL Ver 14.14 Distrib 5.7.28 and nothing happened.


Solution

  • The -lssl and -lcrypto options are provided by the libssl-dev package on Ubuntu/Debian and Ubuntu-like systems.

    Once you install the libssl-dev package you should be able to install the MySQL2 gem.