dhenze
dhenze

Reputation: 340

OSX Lion installation of ruby 1.8.7 (xcode command-line-tools): OpenSSL development headers... not found

I don't know exactly when, but assume with upgrade from Snow Leopard to Lion (10.7.3) my system configuration seems to be messed up. When trying to install ree-1.8.7 I am running into the same problem whatever way I try:

Checking for required software...

* Non-broken C compiler... found at /usr/bin/gcc-4.2
* Non-broken C++ compiler... found at /usr/bin/g++-4.2
* The 'make' tool... found at /usr/bin/make
* The 'patch' tool... found at /usr/bin/patch
* Zlib development headers... found
* OpenSSL development headers... not found
* GNU Readline development headers... found

Some required software is not installed.

This happens when using rvm, rbenv or running the ree installer (went through all options). Though openssl is installed and working:

openssl version                                                                                                             
OpenSSL 0.9.8r 8 Feb 2011

I tried brewing openssl but that did not help either, so did remove it again.

I am quite desperate as I am not able to get it running. Any hints are appreciated.

EDIT: I missed the detail that I have only the xcode command-line tools installed instead of the full xcode package.

Upvotes: 0

Views: 1617

Answers (2)

dhenze
dhenze

Reputation: 340

Don't forget to install the proper libraries via https://github.com/kennethreitz/osx-gcc-installer. Obviously, the xcode-command-line tools that I used are missing the correct development headers.

With the answer of mpapis it should have been possible to tell the compiler the correct location, but it seems that these options are ignored in latest installer. See this forum thread (Point 3 in first post): http://discuss.joyent.com/viewtopic.php?id=25862

Upvotes: 0

mpapis
mpapis

Reputation: 53178

you need to tell the ./configure script where to find openssl headers

RVM forwards any --with* flags to configure, so you can pass --with-openssl-dir=... to rvm command -> https://rvm.beginrescueend.com/packages/openssl/

Using --with-openssl-dir=/usr should do the trick, but there are more options: --with-openssl-include-dir=/usr/include/openssl --with-openssl-lib-dir=/usr/lib (this might be nonstandard installation)

Also very important - ./configure will claim this flags are not recognized, it will be used in make command - check make.log in case of RVM.

Upvotes: 1

Related Questions