linux编译ruby1.8.7 出现OPENSSL错误
2016-06-07 19:29
579 查看
安装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]
好了,问题解决.
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]
好了,问题解决.
相关文章推荐
- Linux安装LAMP oneinstack环境包
- Linux进程管理之task_struct
- linux下统计程序编译时间
- 部署openfire到linux环境下
- Linux下使用rsync进行数据备份的命令详解
- centos安装MSSQL PDO_DBLIB扩展
- Linux 笔记1 git安装apt repo
- centOS6.5安装ftp
- linux查看端口被占用
- Linux 源码安装详解
- linux学习笔记-目录初识
- Linux安装FTP服务-----vsftpd
- linux 开放端口笔记
- Linux中页面的定期换出
- centos mini 安装 vnware tools
- Linux系统用户账号的管理
- Qt在Windows和Linux下使用MySQL
- Linux文件权限详解
- Linux Ubantu安全模式修改root密码
- 虚拟机中CentOS6.8非图形界面配置IP