I'm trying to install Ruby 1.9.2 on CentOS 5.5. I get through most of the make process, but when it tries to compile OpenSSL I get an error. Below is the errror outputted:

compiling openssl
make[1]: Entering directory `/sources/ruby-1.9.2-p136/ext/openssl'
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -o ossl_x509.o -c ossl_x509.c
In file included from ossl.h:201,
                 from ossl_x509.c:11:
openssl_missing.h:71: error: conflicting types for ‘HMAC_CTX_copy’
/usr/include/openssl/hmac.h:102: error: previous declaration of ‘HMAC_CTX_copy’ was here
openssl_missing.h:95: error: conflicting types for ‘EVP_CIPHER_CTX_copy’
/usr/include/openssl/evp.h:459: error: previous declaration of ‘EVP_CIPHER_CTX_copy’ was here
make[1]: *** [ossl_x509.o] Error 1
make[1]: Leaving directory `/sources/ruby-1.9.2-p136/ext/openssl'
make: *** [mkmain.sh] Error 1

Any help would be greatly appreciated! I'm not a master at Linux by any means, but I was able to successfully install this version of Ruby on our dev server. Our live server is running a newer version of OpenSSL which I'm assuming is why it's breaking. Just not sure what the fix is!

link|improve this question
Have a look at this question on Stack Overflow which gives some information. – Iain Feb 25 '11 at 17:06
Thanks, but it seems like that's trying to solve the problem for Windows, and the solution is using a Windows ruby installer script. I think the problem may just be that someone installed a new version of openssl on this server and I'm not pointing the configure script at the right place... – pstinnett Feb 25 '11 at 18:08
feedback

1 Answer

I googled a little, and found a blog post on Installing Ruby 1.9 on CentOS. I've only installed Ruby via source on CentOS once or twice, and that's been over a year ago, but I would highly recommend doing all you can with the CentOS package manager (yum) first - such as install openssl and openssl-devel with yum, like this:

yum install openssl openssl-devel

Hope this helps, David

link|improve this answer
Hi David, thanks for your response. Unfortunately CentOS's package manager (yum) doesn't really keep up-to-date packages. For PCI-Compliance issues our server needs to run OpenSSL 1.0.0c, but I believe the latest version that can be installed via yum is 0.0.98. I'm guessing our manual install of OpenSSL is catching up Ruby, but I'm not 100% sure. – pstinnett Feb 27 '11 at 4:02
What is the issue with PCI compliance that requires 1.0.0c rather than the back-ported fixes Red Hat has made to OpenSSL 0.9.8e? – Mark Wagner May 2 '11 at 23:56
This my huge pet peeve of mine. For some reason, a number of PCI Vendors could not distinguish between packages from the original sources and vendor sources (e.g. Red Hat). Vendor sources are usually not current from a feature standpoint but they DO backport security updates. That is why Red Hat (and CentOS, which is derived from Red Hat) is so popular in Enterprise - customers can count on them to get updates without having applications break. A competent PCI vendor would understand this and take that into account. If not, something is seriously wrong here. . . – Rilindo Sep 18 '11 at 19:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.