# Installing the openssl on CentOS

**URL:** <https://discuss.rubyonrails.org/t/installing-the-openssl-on-centos/60765>\
**Category:** rubyonrails-talk\
**Created:** [September 7, 2011, 8:21am UTC](https://discuss.rubyonrails.org/t/installing-the-openssl-on-centos/60765 "2011-09-07T08:21:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coolesting](https://avatars.discourse-cdn.com/v4/letter/c/e9c0ed/32.png) [@coolesting](https://discuss.rubyonrails.org/u/coolesting)\
**Post date:** [September 7, 2011, 8:21am UTC](https://discuss.rubyonrails.org/t/installing-the-openssl-on-centos/60765/1 "2011-09-07T08:21:55Z")

</div>

Hi, all

Please look my error message ,

$ which openssl /usr/bin/openssl $ whereis openssl openssl: /usr/bin/openssl /usr/lib/openssl /usr/share/man/man1/openssl.1ssl.gz

$ openssl version OpenSSL 1.0.0-fips 29 Mar 2010

$ irb irb(main):001:0\> require ‘openssl’ LoadError: no such file to load – openssl from /usr/local/ruby/lib/ruby/site\_ruby/1.9.1/rubygems/custom\_require.rb:36:in `require’

```
from /usr/local/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):1
from /usr/local/ruby/bin/irb:12:in `<main>'

```

So, what should i do now ?

How do use the openssl in ruby ?

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [September 7, 2011, 8:55am UTC](https://discuss.rubyonrails.org/t/installing-the-openssl-on-centos/60765/2 "2011-09-07T08:55:10Z")

</div>

So you've got the openssl library but not the openssl bindings for ruby. In some environments (e.g. debian) those bindings are a separate package from the main ruby packages. If you compiled ruby yourself (completely by hand or via rvm or similar) then you either didn't have openssl installed at the time or didn't have the openssl development headers (usually installable as a separate package)

Fred

---

<div class="post-metadata">

**Author:** ![coolesting](https://avatars.discourse-cdn.com/v4/letter/c/e9c0ed/32.png) [@coolesting](https://discuss.rubyonrails.org/u/coolesting)\
**Post date:** [September 7, 2011, 9:51am UTC](https://discuss.rubyonrails.org/t/installing-the-openssl-on-centos/60765/3 "2011-09-07T09:51:15Z")

</div>

Thanks

# yum install openssl-devel.i686 openssl.i686

# cd /path/to/ruby\_install\_package/ext/openssl/

# ruby extconf.rb --with–openssl=/usr/bin/openssl

–with–openssl-lib=/usr/lib/openssl

# make && make install

It works for me on CentOS, hoping this helps others.
