gem install redis时报错:Unable to require openssl,install OpenSSL and rebuild ruby (preferred) or use .

本文详细介绍了在使用gem安装redis扩展时遇到的错误:无法加载openssl。提供了具体的解决步骤,包括通过yum安装openssl-devel,调整ruby安装目录下的配置,并修复make过程中遇到的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

gem install redis时报错:Unable to require openssl,install OpenSSL and rebuild ruby (preferred) or use …

ERROR: While executing gem… (Gem::EXception)

          Unable to require openssl,install OpenSSL and 解决步骤:
  1. yum install openssl-devel -y

  2. cd 到 ruby安装目录在这里插入图片描述

3.再 cd ext/openssl ,执行 ruby ./extconf.rb

4.再执行make,若出现make: *** No rule to make target /include/ruby.h', needed byossl.o’. Stop.;则打开Makefile文件,在顶部添加top_srcdir = …/…
在这里插入图片描述

在这里插入图片描述

5.执行make install

ok…

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值