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

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…

猜你喜欢

转载自blog.csdn.net/qq_19457061/article/details/86416075