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

mkdir /tmp/ruby && cd /tmp/ruby
curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz | 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.

  • 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.


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.

  • confirm the fix. Works on latest ruby 2.3 as well. No patch required. – BMW Mar 30 '16 at 6:14

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

  • 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

It is worth mentioning, that after installing any dependencies, you need to rerun the configure step. Simply rerunning make won't do, at least not in all cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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