Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’m trying to install Ruby on Centos-6.4 64-bit as following:

mkdir /tmp/ruby && cd /tmp/ruby
curl --progress | tar xz
cd ruby-2.0.0-p247
./configure --disable-install-rdoc
sudo make install

During the make, following error is displayed:

ossl_pkey_ec.c: In function ‘ossl_ec_group_initialize’:
ossl_pkey_ec.c:766: warning: implicit declaration of function ‘EC_GF2m_simple_method’
ossl_pkey_ec.c:766: warning: assignment makes pointer from integer without a cast
ossl_pkey_ec.c:821: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function)
ossl_pkey_ec.c:821: error: (Each undeclared identifier is reported only once
ossl_pkey_ec.c:821: error: for each function it appears in.)
make[2]: *** [ossl_pkey_ec.o] Error 1
make[2]: Leaving directory `/tmp/ruby/ruby-2.0.0-p247/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: Leaving directory `/tmp/ruby/ruby-2.0.0-p247'
make: *** [build-ext] Error 2

I have already installed it on CentOS 6.5 without this issue, I need it now on CentOS 6.4 & the issue is seems to be related to OpenSSL.

share|improve this question
Mind me asking why you can't just use rvm to install the latest build for you? – scragar May 12 '14 at 15:16

I think you are hitting a bug in Ruby’s OpenSSL API which is in p247 and earlier versions. While the links I give are Fedora specific, I think same issue will be for CentOS.

Try applying this patch before building. More info here.

share|improve this answer
The patch worked for me, thanks! – Carson Reinke Jun 5 '14 at 18:05

You most likely need the system library & related headers from openssl-devel. Try this:

yum install openssl-devel

And if you somehow want to cover all dependencies, this should work:

yum install patch gcc-c++ make bzip2 autoconf automake libtool bison iconv-devel readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel

Then just go back into your ruby-2.0.0-p247 directory, do a make clean & try again from square one.

A lot more details on “gotchas” for installing Ruby on different systems can be found here.

share|improve this answer
confirm the fix. Works on latest ruby 2.3 as well. No patch required. – BMW Mar 30 at 6:14

Check if openssl-devel is installed. 90% of the problems during compilation is a missing dev packages.

share|improve this answer
openssl-1.0.1e-16.el6_5.4.x86_64 openssl-devel-1.0.1e-16.el6_5.4.x86_64 Already Installed – MohyedeenN Jan 21 '14 at 11:53
How can you have openssl-1.0.1e-16.el6_5.4.x86_64 installed on a CentOS 6.4 machine? That is a CentOS 6.5 package IIRC. – faker Jan 21 '14 at 17:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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