# Install/Enable openssl for ruby 1.8.6?

**URL:** <https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487>\
**Category:** ruby-talk\
**Created:** [3 July 2008 02:00 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487 "2008-07-03T02:00:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ja\_Bo](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Ja\_Bo](https://rubytalk.org/u/Ja_Bo)\
**Post date:** [3 July 2008 02:00 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/1 "2008-07-03T02:00:45Z")

</div>

I was trying to install Redmine on rails 2.0.2 (this is not a rails  
question) and I received the following error message:

no such file to load -- openssl

I went to /ruby-1.8.6/ext/openssl and typed make and received the  
following error message:

make: Nothing to be done for `all'.

My question is: How can I install or enable openssl for ruby 1.8.6 in  
order to complete my install for rails.

Thank you!

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Ja\_Bo](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Ja\_Bo](https://rubytalk.org/u/Ja_Bo)\
**Post date:** [3 July 2008 02:34 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/2 "2008-07-03T02:34:15Z")

</div>

additionally im not using an ubuntu/debian distro

Jason Bornhoft wrote:

> **···**
>
> > I was trying to install Redmine on rails 2.0.2 (this is not a rails  
> > question) and I received the following error message:
> > 
> > no such file to load -- openssl
> > 
> > I went to /ruby-1.8.6/ext/openssl and typed make and received the  
> > following error message:
> > 
> > make: Nothing to be done for `all'.
> > 
> > My question is: How can I install or enable openssl for ruby 1.8.6 in  
> > order to complete my install for rails.
> > 
> > Thank you!
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Howard\_Roberts](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@Howard\_Roberts](https://rubytalk.org/u/Howard_Roberts)\
**Post date:** [3 July 2008 03:19 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/3 "2008-07-03T03:19:59Z")

</div>

Jason Bornhoft wrote:

> I went to /ruby-1.8.6/ext/openssl and typed make and received the  
> following error message:
> 
> make: Nothing to be done for `all'.
> 
> My question is: How can I install or enable openssl for ruby 1.8.6 in  
> order to complete my install for rails.
> 
> Thank you!

Jason,  
I ran into the exact same issue recently. Make sure you have the Open  
SSL development libraries and header files somewhere in a standard  
location for compiling software, then try: make clean, configure, make,  
and make install. You didn't specify which OS you do have, so, YMMV 🙂

HTH,  
Howard

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Ja\_Bo](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Ja\_Bo](https://rubytalk.org/u/Ja_Bo)\
**Post date:** [3 July 2008 03:51 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/4 "2008-07-03T03:51:42Z")

</div>

Thank you. I'm using a non-debian linux...

I installed openssl from scratch. Let me try what you've suggested.

Howard Roberts wrote:

> **···**
>
> > Jason Bornhoft wrote:
> > 
> > > I went to /ruby-1.8.6/ext/openssl and typed make and received the  
> > > following error message:
> > > 
> > > make: Nothing to be done for `all'.
> > > 
> > > My question is: How can I install or enable openssl for ruby 1.8.6 in  
> > > order to complete my install for rails.
> > > 
> > > Thank you!
> > 
> > Jason,  
> > I ran into the exact same issue recently. Make sure you have the Open  
> > SSL development libraries and header files somewhere in a standard  
> > location for compiling software, then try: make clean, configure, make,  
> > and make install. You didn't specify which OS you do have, so, YMMV 🙂
> > 
> > HTH,  
> > Howard
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Ja\_Bo](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Ja\_Bo](https://rubytalk.org/u/Ja_Bo)\
**Post date:** [3 July 2008 04:12 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/5 "2008-07-03T04:12:34Z")

</div>

Still getting the same error...

make: Nothing to be done for `all'.

How can I ensure that the headers and dev libraries are properly  
installed?

Jason Bornhoft wrote:

> **···**
>
> > Thank you. I'm using a non-debian linux...
> > 
> > I installed openssl from scratch. Let me try what you've suggested.
> > 
> > Howard Roberts wrote:
> > 
> > > Jason Bornhoft wrote:
> > > 
> > > > I went to /ruby-1.8.6/ext/openssl and typed make and received the  
> > > > following error message:
> > > > 
> > > > make: Nothing to be done for `all'.
> > > > 
> > > > My question is: How can I install or enable openssl for ruby 1.8.6 in  
> > > > order to complete my install for rails.
> > > > 
> > > > Thank you!
> > > 
> > > Jason,  
> > > I ran into the exact same issue recently. Make sure you have the Open  
> > > SSL development libraries and header files somewhere in a standard  
> > > location for compiling software, then try: make clean, configure, make,  
> > > and make install. You didn't specify which OS you do have, so, YMMV 🙂
> > > 
> > > HTH,  
> > > Howard
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [3 July 2008 04:17 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/6 "2008-07-03T04:17:44Z")

</div>

You're sure you ran make clean first? If that still doesn't do it, you'll have to re-run configure with the location of your openssl.

> **···**
>
> On Jul 2, 2008, at 21:12 PM, Jason Bornhoft wrote:
> 
> > > Howard Roberts wrote:
> > > 
> > > > Jason Bornhoft wrote:
> > > > 
> > > > > I went to /ruby-1.8.6/ext/openssl and typed make and received the  
> > > > > following error message:
> > > > > 
> > > > > make: Nothing to be done for `all'.
> > > > 
> > > > I ran into the exact same issue recently. Make sure you have the Open  
> > > > SSL development libraries and header files somewhere in a standard  
> > > > location for compiling software, then try: make clean, configure, make,  
> > > > and make install. You didn't specify which OS you do have, so, YMMV 🙂
> > 
> > Still getting the same error...
> > 
> > make: Nothing to be done for `all'.
> > 
> > How can I ensure that the headers and dev libraries are properly  
> > installed?

---

<div class="post-metadata">

**Author:** ![Ja\_Bo](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Ja\_Bo](https://rubytalk.org/u/Ja_Bo)\
**Post date:** [3 July 2008 04:23 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/7 "2008-07-03T04:23:16Z")

</div>

Eric Hodel wrote:

> **···**
>
> > On Jul 2, 2008, at 21:12 PM, Jason Bornhoft wrote:
> > 
> > > > > location for compiling software, then try: make clean, configure,  
> > > > > make,  
> > > > > and make install. You didn't specify which OS you do have, so,  
> > > > > YMMV 🙂
> > > 
> > > Still getting the same error...
> > > 
> > > make: Nothing to be done for `all'.
> > > 
> > > How can I ensure that the headers and dev libraries are properly  
> > > installed?
> > 
> > You're sure you ran make clean first? If that still doesn't do it,  
> > you'll have to re-run configure with the location of your openssl.
> 
> Ok. I installed the openssl from source after I installed ruby. Can  
> that be my issue?  
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Jeremy\_Hinegardner](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jeremy\_Hinegardner](https://rubytalk.org/u/Jeremy_Hinegardner)\
**Post date:** [3 July 2008 05:20 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/8 "2008-07-03T05:20:50Z")

</div>

Yes, that would do it. When you built ruby from scratch openssl was not  
on your system. At that point ruby had no way of building the openssl  
extension so it would of course exclude it.

If you are building ruby from scratch, then you must make sure that all  
the dependencies that ruby requires and for the extensions you want to  
build are already on the system.

enjoy,

-jeremy

> **···**
>
> On Thu, Jul 03, 2008 at 01:23:16PM +0900, Jason Bornhoft wrote:
> 
> > Eric Hodel wrote:  
> > \> On Jul 2, 2008, at 21:12 PM, Jason Bornhoft wrote:  
> > \>\>\>\> location for compiling software, then try: make clean, configure,  
> > \>\>\>\> make,  
> > \>\>\>\> and make install. You didn't specify which OS you do have, so,  
> > \>\>\>\> YMMV 🙂  
> > \>\>\>  
> > \>\> Still getting the same error...  
> > \>\>  
> > \>\> make: Nothing to be done for `all'.  
> > \>\>  
> > \>\> How can I ensure that the headers and dev libraries are properly  
> > \>\> installed?  
> > \>  
> > \> You're sure you ran make clean first? If that still doesn't do it,  
> > \> you'll have to re-run configure with the location of your openssl.
> > 
> > Ok. I installed the openssl from source after I installed ruby. Can  
> > that be my issue?
> 
> # --
> 
> Jeremy Hinegardner jeremy@hinegardner.org

---

<div class="post-metadata">

**Author:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [3 July 2008 07:46 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/9 "2008-07-03T07:46:47Z")

</div>

a) unpack and install ruby  
b) notice that openssl extension is missing  
c) install openssl libs + headers # you are here  
d) make clean in ruby  
e) make and install ruby

should do it.

the first time around ruby generated a do-nothing Makefile for the openssl bindings. make clean removes this empty makefile so that it can be generated correctly. If you still don't have openssl after that, you'll need to tell configure where you installed it.

> **···**
>
> On Jul 2, 2008, at 22:20 PM, Jeremy Hinegardner wrote:
> 
> > On Thu, Jul 03, 2008 at 01:23:16PM +0900, Jason Bornhoft wrote:
> > 
> > > Eric Hodel wrote:
> > > 
> > > > On Jul 2, 2008, at 21:12 PM, Jason Bornhoft wrote:
> > > > 
> > > > > > > location for compiling software, then try: make clean, configure,  
> > > > > > > make,  
> > > > > > > and make install. You didn't specify which OS you do have, so,  
> > > > > > > YMMV 🙂
> > > > > 
> > > > > Still getting the same error...
> > > > > 
> > > > > make: Nothing to be done for `all'.
> > > > > 
> > > > > How can I ensure that the headers and dev libraries are properly  
> > > > > installed?
> > > > 
> > > > You're sure you ran make clean first? If that still doesn't do it,  
> > > > you'll have to re-run configure with the location of your openssl.
> > > 
> > > Ok. I installed the openssl from source after I installed ruby. Can  
> > > that be my issue?
> > 
> > Yes, that would do it. When you built ruby from scratch openssl was not  
> > on your system. At that point ruby had no way of building the openssl  
> > extension so it would of course exclude it.
> > 
> > If you are building ruby from scratch, then you must make sure that all  
> > the dependencies that ruby requires and for the extensions you want to  
> > build are already on the system.

---

<div class="post-metadata">

**Author:** ![Ja\_Bo](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Ja\_Bo](https://rubytalk.org/u/Ja_Bo)\
**Post date:** [3 July 2008 13:32 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/10 "2008-07-03T13:32:10Z")

</div>

Eric Hodel wrote:

> > > > > make: Nothing to be done for `all'.
> > 
> > Yes, that would do it. When you built ruby from scratch openssl was  
> > not  
> > on your system. At that point ruby had no way of building the openssl  
> > extension so it would of course exclude it.
> > 
> > If you are building ruby from scratch, then you must make sure that  
> > all  
> > the dependencies that ruby requires and for the extensions you want to  
> > build are already on the system.
> 
> a) unpack and install ruby  
> b) notice that openssl extension is missing  
> c) install openssl libs + headers # you are here  
> d) make clean in ruby  
> e) make and install ruby
> 
> should do it.
> 
> the first time around ruby generated a do-nothing Makefile for the  
> openssl bindings. make clean removes this empty makefile so that it  
> can be generated correctly. If you still don't have openssl after  
> that, you'll need to tell configure where you installed it.

Yeah its exactly as you say. Here is the output from the mkmf.log:

have\_header: checking for openssl/ssl.h... -------------------- no

"gcc -E -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -g -O2 conftest.c  
-o con$  
In file included from /usr/include/openssl/ssl.h:179,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from conftest.c:1:  
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory  
checked program was:  
/\* begin \*/  
1: #include \<openssl/ssl.h\>  
/\* end \*/

> **···**
>
> > On Jul 2, 2008, at 22:20 PM, Jeremy Hinegardner wrote:
> 
> --------------------
> 
> package configuration for openssl is not found
> 
> Thank you for all your help!  
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Ja\_Bo](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Ja\_Bo](https://rubytalk.org/u/Ja_Bo)\
**Post date:** [3 July 2008 14:44 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/11 "2008-07-03T14:44:45Z")

</div>

Jason Bornhoft wrote:

> Eric Hodel wrote:
> 
> > > > > > make: Nothing to be done for `all'.
> > > 
> > > Yes, that would do it. When you built ruby from scratch openssl was  
> > > not  
> > > on your system. At that point ruby had no way of building the openssl  
> > > extension so it would of course exclude it.
> > > 
> > > If you are building ruby from scratch, then you must make sure that  
> > > all  
> > > the dependencies that ruby requires and for the extensions you want to  
> > > build are already on the system.
> > 
> > a) unpack and install ruby  
> > b) notice that openssl extension is missing  
> > c) install openssl libs + headers # you are here  
> > d) make clean in ruby  
> > e) make and install ruby
> > 
> > should do it.
> > 
> > the first time around ruby generated a do-nothing Makefile for the  
> > openssl bindings. make clean removes this empty makefile so that it  
> > can be generated correctly. If you still don't have openssl after  
> > that, you'll need to tell configure where you installed it.
> 
> Yeah its exactly as you say. Here is the output from the mkmf.log:
> 
> have\_header: checking for openssl/ssl.h... -------------------- no
> 
> "gcc -E -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -g -O2 conftest.c  
> -o con$  
> In file included from /usr/include/openssl/ssl.h:179,  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from conftest.c:1:  
> /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory  
> checked program was:  
> /\* begin \*/  
> 1: #include \<openssl/ssl.h\>  
> /\* end \*/
> 
> --------------------
> 
> package configuration for openssl is not found
> 
> Thank you for all your help!

Problem solved! For anyone else with the same issue... here is what i  
did:

install openssl:

&nbsp;&nbsp;&nbsp;&nbsp;./config --prefix=/usr/local --openssldir=/usr/local/ssl  
&nbsp;&nbsp;&nbsp;&nbsp;make  
&nbsp;&nbsp;&nbsp;&nbsp;make test  
&nbsp;&nbsp;&nbsp;&nbsp;make install (as root)  
&nbsp;&nbsp;&nbsp;&nbsp;./config shared --prefix=/usr/local --openssldir=/usr/local/ssl  
&nbsp;&nbsp;&nbsp;&nbsp;make clean  
&nbsp;&nbsp;&nbsp;&nbsp;make  
&nbsp;&nbsp;&nbsp;&nbsp;make install (as root)  
&nbsp;&nbsp;&nbsp;&nbsp;cd /usr/local/ssl/lib  
&nbsp;&nbsp;&nbsp;&nbsp;cp \* /usr/lib

To avoid getting the following error later when you compile OpenSSH:

&nbsp;&nbsp;&nbsp;&nbsp;configure: error: Your OpenSSL headers do  
&nbsp;&nbsp;&nbsp;&nbsp;not match your library

copy all the SSL include files everywhere:

&nbsp;&nbsp;&nbsp;&nbsp;cd /home/tjnelson/openssl/openssl-\*  
&nbsp;&nbsp;&nbsp;&nbsp;cd include/openssl  
&nbsp;&nbsp;&nbsp;&nbsp;cp \* /usr/include  
&nbsp;&nbsp;&nbsp;&nbsp;cp \* /usr/local/ssl/include  
&nbsp;&nbsp;&nbsp;&nbsp;cp \* /usr/local/ssl/include/openssl

and then add /usr/local/ssl/lib to /etc/ld.so.conf and type

&nbsp;&nbsp;&nbsp;&nbsp;ldconfig

Then i returned to ruby-\*/ext/openssl and ran:

ruby extconf.rb  
make clean  
make  
make install

worked like a charm!!!

thanks for all of your help

> **···**
>
> > > On Jul 2, 2008, at 22:20 PM, Jeremy Hinegardner wrote:
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [3 July 2008 18:16 UTC](https://rubytalk.org/t/install-enable-openssl-for-ruby-1-8-6/47487/12 "2008-07-03T18:16:32Z")

</div>

It sounds like your base openssl headers are broken. You should file a bug with your OS and include this output.

> **···**
>
> On Jul 3, 2008, at 06:32 AM, Jason Bornhoft wrote:
> 
> > Yeah its exactly as you say. Here is the output from the mkmf.log:
> > 
> > have\_header: checking for openssl/ssl.h... -------------------- no
> > 
> > "gcc -E -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -g -O2 conftest.c  
> > -o con$  
> > In file included from /usr/include/openssl/ssl.h:179,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from conftest.c:1:  
> > /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory  
> > checked program was:  
> > /\* begin \*/  
> > 1: #include \<openssl/ssl.h\>  
> > /\* end \*/
> > 
> > --------------------
> > 
> > package configuration for openssl is not found
