解决方法如下:
vi ext/openssl/ossl_pkey_ec.c #ext目录放置在ruby安装文件的解压目录ruby-1.9.3-p0里.
#在method = EC_GFp_nist_method();下一行新增 #if !defined(OPENSSL_NO_EC2M)
#在method = EC_GFp_simple_method();下一行新增 #endif
--------------------------如下-----------------------------------
if (id == s_GFp_simple) {
method = EC_GFp_simple_method();
} else if (id == s_GFp_mont) {
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
method = EC_GF2m_simple_method();
#endif
}
#在new_curve = EC_GROUP_new_curve_GFp;下一行新增 #if !defined(OPENSSL_NO_EC2M)
#在new_curve = EC_GROUP_new_curve_GF2m;下一行新增 #endif
-------------------------如下--------------------------------
if (id == s_GFp) {
new_curve = EC_GROUP_new_curve_GFp;
#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m) {
new_curve = EC_GROUP_new_curve_GF2m;
#endif
} else {
ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
}
修改以上两个地方以后,就能正常安装了!
文章来自:http://blog.csdn.net/motian06/article/details/19117407
转载于:https://blog.51cto.com/denglz/1365041