wb_y9w
Last Updated: February 25, 2016
·
3.351K
· momoto
201611140121

cannot load such file -- openssl (LoadError)

lib/ruby/1.9.1/net/https.rb:22:in `require': cannot load such file -- openssl (LoadError)
    from ~/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1

1. Install OpenSSL

  • Using APT

    $ sudo apt-get install libssl-dev
  • Using Yum

    $ sudo yum install openssl-devel
  • Install from source

    curl http://www.openssl.org/source/openssl-<latest>.tar.gz > openssl-latest.tar.gz
    tar xfz openssl-latest.tar.gz 
    cd openssl-latest
    ./config; make; make install

2. Build extension

cd <ruby_root>/ext/openssl/
ruby extconf.rb --with-openssl-dir=<openssl_root>; make; make install

References

Say Thanks
Respond

2 Responses
Add your response

5321
Bard2

what if I don't use Debian family linux?
what if I don't use rbenv?

Next time add tags.

over 1 year ago ·
5369
201611140121

@bartlomiejdanek Thanks for your comments. I added another description of installing.

over 1 year ago ·