# Openssl error - ubuntu

**URL:** <https://www.ruby-forum.com/t/openssl-error-ubuntu/77998>\
**Category:** Ruby\
**Created:** [December 2, 2006, 1:17pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998 "2006-12-02T13:17:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [December 2, 2006, 1:17pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/1 "2006-12-02T13:17:14Z")

</div>

Help!

Why do I continually get the following error?

* * *

## irb(main):001:0\> require ‘openssl’ LoadError: no such file to load – openssl from (irb):1:in `require’ from (irb):1

I’ve tried everything in every post about this. I’ve blown away my  
ruby install like 6 times. How do I get ruby to recognize openssl?

I’ve installed:

ubuntu  
ruby 1.8.5  
libopenssl-ruby  
libzlib-ruby  
libyaml-ruby  
libdrb-ruby  
liberb-ruby  
zlib1g-dev

Any suggestions?

Thank you,  
Chad

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [December 2, 2006, 1:46pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/2 "2006-12-02T13:46:37Z")

</div>

do you have ‘openssl’ installed? try to install, libssl0.9.8 or highet  
and libssl-dev.

jflez.

Chad wrote:

> Help!
> 
> Why do I continually get the following error?
> 
> * * *
> 
> ## irb(main):001:0\> require ‘openssl’ LoadError: no such file to load – openssl from (irb):1:in `require’ from (irb):1
> 
> I’ve tried everything in every post about this. I’ve blown away my  
> ruby install like 6 times. How do I get ruby to recognize openssl?
> 
> I’ve installed:
> 
> ubuntu  
> ruby 1.8.5  
> libopenssl-ruby  
> libzlib-ruby  
> libyaml-ruby  
> libdrb-ruby  
> liberb-ruby  
> zlib1g-dev
> 
> Any suggestions?
> 
> Thank you,  
> Chad

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [December 2, 2006, 8:12pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/3 "2006-12-02T20:12:01Z")

</div>

Absolutely… I’m not a linux expert though, but I have a feeling  
they’re installing somewhere that ruby can’t see them. What can I do  
to ensure apt-get is behaving properly?

See below:

[/root] # apt-get install openssl  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
openssl is already the newest version.

[/root] # apt-get install libssl-dev  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
libssl-dev is already the newest version.

Thank you,  
Chad

On Dec 2, 4:46 am, Jose francisco Gonzalez carmona  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> do you have ‘openssl’ installed? try to install, libssl0.9.8 or highet  
> and libssl-dev.
> 
> jflez.

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [December 3, 2006, 12:35am UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/4 "2006-12-03T00:35:26Z")

</div>

I finally figured it out.

I cleaned out all the current openssl files, then took the ruby 1.8.5  
source, went into the ruby-1.8.5/ext/openssl directory and created the  
openssl make file:

ruby extconf.rb  
make  
make install

and that fiiiiinally but the libraries where they should go.

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [December 3, 2006, 4:28pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/5 "2006-12-03T16:28:50Z")

</div>

On 12/3/06, Chad [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> and that fiiiiinally but the libraries where they should go.

Thanks for sharing, I have tried about 1 week to get it going, without  
success!!!

Cheers  
Robert

–  
“The real romance is out ahead and yet to come. The computer revolution  
hasn’t started yet. Don’t be misled by the enormous flow of money into  
bad  
defacto standards for unsophisticated buyers using poor adaptations of  
incomplete ideas.”

- Alan Kay

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [April 7, 2007, 6:38am UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/6 "2007-04-07T06:38:06Z")

</div>

I’ve followed this, and I’m still stuck.

I’ve done the following:  
sudo apt-get install openssl  
sudo apt-get install libssl-dev  
sudo apt-get install libssl0.9.8

gone into /ext/openssl/ and run  
ruby extconf.rb  
cd …/…  
make  
make install

At least now all those commands work without failing to find openssl.  
Still, though, running irb and calling “require ‘openssl’” yeilds the  
very frustrating “no such file to load – libssl”

What else am I forgetting to check?

-Gaius

Robert D. wrote:

> On 12/3/06, Chad [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > and that fiiiiinally but the libraries where they should go.
> 
> Thanks for sharing, I have tried about 1 week to get it going, without  
> success!!!
> 
> Cheers  
> Robert
> 
> –  
> “The real romance is out ahead and yet to come. The computer revolution  
> hasn’t started yet. Don’t be misled by the enormous flow of money into  
> bad  
> defacto standards for unsophisticated buyers using poor adaptations of  
> incomplete ideas.”
> 
> - Alan Kay

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [April 7, 2007, 6:44am UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/7 "2007-04-07T06:44:36Z")

</div>

I solved my own problem: the make and make install should be run from  
the ext/openssl/ directory (and it’s fine if there’s “nothing to do for  
make”).

-Gaius

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [June 11, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/8 "2008-06-11T15:15:35Z")

</div>

Chad wrote:

> I finally figured it out.
> 
> I cleaned out all the current openssl files, then took the ruby 1.8.5  
> source, went into the ruby-1.8.5/ext/openssl directory and created the  
> openssl make file:
> 
> ruby extconf.rb  
> make  
> make install
> 
> and that fiiiiinally but the libraries where they should go.

This information helped me when I was struggling with this problem  
today.  
I registed into this forum , immediately, only to thank you.

Prasad

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [May 15, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/9 "2008-05-15T18:03:56Z")

</div>

Thanks for all the help. The full story of how I installed Rails can be  
found in  
[http://forum.eeeuser.com/viewtopic.php?pid=257583#p257583](http://forum.eeeuser.com/viewtopic.php?pid=257583#p257583)  
[http://forum.eeeuser.com/viewtopic.php?pid=257583](http://forum.eeeuser.com/viewtopic.php?pid=257583)

Gaius Centus Novus wrote:

> I solved my own problem: the make and make install should be run from  
> the ext/openssl/ directory (and it’s fine if there’s “nothing to do for  
> make”).
> 
> -Gaius

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [June 19, 2008, 11:50am UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/10 "2008-06-19T11:50:53Z")

</div>

Thanks a lot pal, it worked perfectly for me too. I had the same openssl  
problem on a new ubuntu server box. Thanks for the tip.

Chad wrote:

> I finally figured it out.
> 
> I cleaned out all the current openssl files, then took the ruby 1.8.5  
> source, went into the ruby-1.8.5/ext/openssl directory and created the  
> openssl make file:
> 
> ruby extconf.rb  
> make  
> make install
> 
> and that fiiiiinally but the libraries where they should go.

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [June 19, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/11 "2008-06-19T16:20:12Z")

</div>

So much for distribution’s package managers making your life easier,  
huh? 😉

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [June 22, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/12 "2008-06-22T20:14:22Z")

</div>

On Fri, Jun 20, 2008 at 1:18 PM, Lucas N.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ## If you can still reproduce this, I would be interested in the outputs of “dpkg -l | grep ruby” and “dpkg -L libopenssl-ruby1.8” on your system.
> 
> | Lucas N.  
> | removed\_email\_address@domain.invalid [http://www.lucas-nussbaum.net/](http://www.lucas-nussbaum.net/) |  
> | jabber: removed\_email\_address@domain.invalid GPG: 1024D/023B3F4F |
> 
> If I rememer right, ‘require “openssl”’ raised an error when I compiled  
> from source of ruby-1.8.6 or ruby-1.8.7 after Ubuntu-8.04 fresh install.

I did not try the ruby package.

Prasad

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [June 20, 2008, 9:50am UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/13 "2008-06-20T09:50:58Z")

</div>

On 19/06/08 at 23:18 +0900, Marc H. wrote:

> So much for distribution’s package managers making your life easier,  
> huh? 😉

I don’t think anybody reported a bug about that to Ubuntu or Debian. And  
Ubuntu just imports the Ruby packages from Debian.

Also, it works perfectly fine here. On a clean Debian install:  
apt-get install ruby libopenssl-ruby ; ruby -e ‘require “openssl”’  
doesn’t raise any error.

If you can still reproduce this, I would be interested in the outputs of  
“dpkg -l | grep ruby” and “dpkg -L libopenssl-ruby1.8” on your system.

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [December 24, 2008, 8:15am UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/14 "2008-12-24T08:15:05Z")

</div>

Nate W. wrote:

> This worked for me:
> 
> 1. Compile SSL from scratch
> 
> 2. Make note of the install location, shown as  
> /where/you/installed/openssl below
> 
> 3. Use the earlier instruction (above) to manually create the extension:
> 
> cd ext/openssl  
> …/…/ruby extconf.rb  
> –with-openssl-include=/where/you/installed/openssl/include  
> –with-openssl-lib=/where/you/installed/openssl  
> LD\_RUN\_PATH=/where/you/installed/openssl/lib make  
> make install
> 
> I’m not sure the LD\_RUN\_PATH is needed, but I’ve had problems with Ruby  
> before so included it to be safe.
> 
> -Nate

What does this error message on my blog mean?  
I’ve posted my blog on a site ([houseblogs.net](http://houseblogs.net)). If you go to the blog  
address directly, it comes up fine. But if you click on it from  
[houseblogs.net](http://houseblogs.net) you get this message:  
The requested URL /community/extensions/Blogs/greybox/0 was not found on  
this server.  
Additionally, a 404 Not Found error was encountered while trying to use  
an ErrorDocument to handle the request.  
Apache/2.0.61 (Unix) mod\_ssl/2.0.61 OpenSSL/0.9.8b mod\_bwlimited/1.4  
FrontPage/5.0.2.2635 mod\_auth\_passthrough/2.1 PHP/5.2.4 Server at  
[www.houseblogs.net](http://www.houseblogs.net) Port 80

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [August 28, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/15 "2008-08-28T19:30:17Z")

</div>

This worked for me:

1. Compile SSL from scratch

2. Make note of the install location, shown as  
/where/you/installed/openssl below

3. Use the earlier instruction (above) to manually create the extension:

cd ext/openssl  
…/…/ruby extconf.rb  
–with-openssl-include=/where/you/installed/openssl/include  
–with-openssl-lib=/where/you/installed/openssl  
LD\_RUN\_PATH=/where/you/installed/openssl/lib make  
make install

I’m not sure the LD\_RUN\_PATH is needed, but I’ve had problems with Ruby  
before so included it to be safe.

-Nate

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [March 20, 2009, 11:43pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/16 "2009-03-20T23:43:23Z")

</div>

If you’d rather not build form source, just do this (it worked for me on  
Intrepid):

sudo apt-get install libopenssl-ruby

and then try again.

Amar Eis wrote:

> Nate W. wrote:
> 
> > This worked for me:
> > 
> > 1. Compile SSL from scratch
> > 
> > 2. Make note of the install location, shown as  
> > /where/you/installed/openssl below
> > 
> > 3. Use the earlier instruction (above) to manually create the extension:
> > 
> > cd ext/openssl  
> > …/…/ruby extconf.rb  
> > –with-openssl-include=/where/you/installed/openssl/include  
> > –with-openssl-lib=/where/you/installed/openssl  
> > LD\_RUN\_PATH=/where/you/installed/openssl/lib make  
> > make install
> > 
> > I’m not sure the LD\_RUN\_PATH is needed, but I’ve had problems with Ruby  
> > before so included it to be safe.
> > 
> > -Nate
> 
> What does this error message on my blog mean?  
> I’ve posted my blog on a site ([houseblogs.net](http://houseblogs.net)). If you go to the blog  
> address directly, it comes up fine. But if you click on it from  
> [houseblogs.net](http://houseblogs.net) you get this message:  
> The requested URL /community/extensions/Blogs/greybox/0 was not found on  
> this server.  
> Additionally, a 404 Not Found error was encountered while trying to use  
> an ErrorDocument to handle the request.  
> Apache/2.0.61 (Unix) mod\_ssl/2.0.61 OpenSSL/0.9.8b mod\_bwlimited/1.4  
> FrontPage/5.0.2.2635 mod\_auth\_passthrough/2.1 PHP/5.2.4 Server at  
> [www.houseblogs.net](http://www.houseblogs.net) Port 80

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [January 8, 2010, 7:50pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/17 "2010-01-08T19:50:13Z")

</div>

I to all.

I’m new for the forum,  
and not many able with linux e ruby,  
but I’m on IT from many years.

I’ve read your discussion (and many other) …  
I have the same problem …  
“no such file to load – openssl”  
with ruby /script/server

I’ve installed ruby-1.9.1-p376 (without openssl) on a  
vmware ubuntu 8.04 virtual machine.

For what I’ve understand, our suggests works fine  
on ruby 1.8 / 1.9,  
but for 1.9.1 I’ve not found anything.

Installing openssl, libssl-dev or libopenssl-ruby1.9  
on my filesystem was created …/ruby/1.9.0,  
but my ruby are on /ruby/1.9.1 !!

How I can download ruby1.9.1 with /ext subdir …  
or how I can integrate with openssl my ruby1.9.1.

Sorry for my english …  
and for my stupid question ☹

I hope my question are understandable.

fellons

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [January 8, 2010, 7:57pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/18 "2010-01-08T19:57:02Z")

</div>

Roberto F. wrote:

> I to all.

This may not address your concerns at all, but something we found out  
last year  
is that Debian / Ubuntu Server adopt GNUTLS for some facilities as  
opposed to  
OpenSSL, which has some implications for some things like behaviors with  
adoptions of certificates that are self-signed, or not signed by  
canonical  
sources. OpenLDAP was the one we were seeing this on. It worked with  
internal  
certs on CentOS, but not on Ubuntu Server, which uses GNUTLS instead of  
OpenSSL  
for this.

xc

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [January 8, 2010, 7:58pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/19 "2010-01-08T19:58:48Z")

</div>

On Fri, Jan 8, 2010 at 11:50 AM, Roberto F.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How I can download ruby1.9.1 with /ext subdir …  
> or how I can integrate with openssl my ruby1.9.1.

Recompile and reinstall ruby 1.9.1 with the libssl-dev package  
installed, and you might want to synchronize your system time with  
‘sudo ntpdate [ntp.ubuntu.com](http://ntp.ubuntu.com)’ before compiling… I’ve had it refuse  
to compile the openssl extension due to a skewed clock before.

Good luck…

-Jonathan N.

---

<div class="post-metadata">

**Author:** ![Chad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@Chad](https://www.ruby-forum.com/u/Chad)\
**Post date:** [January 8, 2010, 11:17pm UTC](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998/20 "2010-01-08T23:17:12Z")

</div>

On 09/01/10 at 03:50 +0900, Roberto F. wrote:

> Installing openssl, libssl-dev or libopenssl-ruby1.9  
> on my filesystem was created …/ruby/1.9.0,  
> but my ruby are on /ruby/1.9.1 !!

Install libopenssl-ruby1.9.1.

[Next page](https://www.ruby-forum.com/t/openssl-error-ubuntu/77998.md?page=2)
