gem install -l redis-3.3.3.gem
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
1、cd ruby-2.5.1/ext/zlib目录,执行
ruby ./extconf.rb
make
make install
2、make时报错(chmod +x Makefile):make: *** No rule to make target `/include/ruby.h', needed by `zlib.o'. Stop.
3、更改Makefile文件, zlib.o: $(top_srcdir)/include/ruby.h 改成 zlib.o: ../../include/ruby.h 到这里就可以make成功了。
4、进入/ruby-2.5.1/ext/openssl目录执行 ruby ./extconf.rb、make 、make install命令。