Centos7装Ruby

1. 准备需要的安装的东西


yum -y install make gcc openssl-devel zlib-devel gcc gcc-c++ make autoconf readline-devel curl-devel expat-devel gettext-devel ncurses-devel sqlite3-devel mysql-devel httpd-devel wget which


2 下载源文件


cd /usr/src


wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz


tar zxf yaml-0.1.4.tar.gz


cd yaml-0.1.4


./configure --prefix=/usr/local


make && make install

cd /usr/src


wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz


tar zxf ruby-1.9.3-p0.tar.gz


cd ruby-1.9.3-p0


./configure --prefix=/usr/local --disable-install-doc --with-opt-dir=/usr/local/lib


make && make install


3 whereis 查看ruby路径


whereis ruby


安装到make&& make install 时,系统报错,解决方式参考:http://blog.csdn.net/iefreer/article/details/18828515

详细错误信息:

[plain]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. Error: ossl_pkey_ec.c:In functin 'ossl_ec_group_initialize':   
  2. ossl_pkey_ec.c:816:error: 'EC_GROUP_new_curve_GF2m' undeclard   
  3. (first use in this function) ossl_pkey_ec.c:816:error:   
  4. (Each undeclard indentifier is reported only once ossl_pkey_ec.c:816   
  5. error:for each function it appearts in.)  

问题原因:

由于redhat新版本默认openssl的配置变更取消了对EC_xx的支持,所以出现该错误。


解决方法:

该问题在ruby网站上已经提交并有了补丁。

参见链接:https://bugs.ruby-lang.org/issues/8384


即修改ext/openssl/ossl_pkey_ec.c代码如下:




成功安装!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值