博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux编译ruby1.8.7 出现OPENSSL错误
阅读量:6910 次
发布时间:2019-06-27

本文共 1096 字,大约阅读时间需要 3 分钟。

安装ruby-1.8.7出现编译错误.如下:
ossl_pkey_ec.c:815: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function)
ossl_pkey_ec.c:815: error: (Each undeclared identifier is reported only once
ossl_pkey_ec.c:815: error: for each function it appears in.)
make[1]: *** [ossl_pkey_ec.o] Error 1
make[1]: Leaving directory `/home/vagrant/ruby-1.8.7-p357/ext/openssl'
make: *** [all] Error 1
 
解决方法如下:
vi ~/install/ruby-1.8.7-p357/ext/openssl/ossl_pkey_ec.c
改下面4个地方,+号是添加的:
 
                 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
             }
             if (method) {
             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 {
                 rb_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
             }
 
 
改好了之后,再重新编译,如下:
./configure --prefix=/usr/local/ruby
make
make install
然后再查看ruby版本号:
/usr/local/ruby/bin/ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
 
好了,问题解决.

转载地址:http://sagdl.baihongyu.com/

你可能感兴趣的文章
leetcode - Remove Duplicates from Sorted List II
查看>>
AndroidStudio下gradle的入门介绍与使用
查看>>
ActiveMQ入门实例
查看>>
PyCharm快捷键
查看>>
item.imageInsets =
查看>>
Git 经常使用命令
查看>>
欧几里得算法与扩展欧几里得算法
查看>>
asp.net core中使用log4net
查看>>
经营操作系统的一些思路
查看>>
配置ssh的config文件-为每个ssh连接创建别名
查看>>
AndrewNG Deep learning课程笔记 - RNN
查看>>
如何解决 Windows 实例出现身份验证错误及更正 CredSSP
查看>>
如何修改Xampp服务器上的mysql密码(图解)
查看>>
vue项目,ie11 浏览器报 Promise 未定义的错误
查看>>
使用Navicat连接阿里云mysql报错10061
查看>>
c#金额转换成中文大写金额
查看>>
理解sklearn.feature.text中的CountVectorizer和TfidfVectorizer
查看>>
在OAF页面中集成ECharts以及highcharts用于显示图表
查看>>
hibernate.properties和hibernate.cfg.xml
查看>>
DataSet排序问题
查看>>