Get the App
SLTechnology News&Howtos  ›  Database  › 

What if gem install redis reports an error?

Shulou Source: shulou.com Published: 2022-05-31 21:20:07 10月04日 Update

Editor to share with you how to do gem install redis error report, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

When you use the ruby script to install the Redis cluster, you need to install the Ruby locale and the redis plug-in first, but when you install the Ruby plug-in, you encounter the following error. Please note the resolution process below.

Because the Ruby locale is required to execute Ruby scripts, install the Ruby locale and Ruby's package manager Gems first.

Then use gem to install the interface between Redis and Ruby.

RubyGems is a package manager for Ruby that provides a standard format for distributing Ruby programs and libraries, as well as a tool for managing package installations.

RubyGems is designed to easily manage the tools installed by gem, as well as the servers used to distribute gem. This is similar to apt-get under Ubuntu and pip to yum,Python of Centos.

When installing the interface between Ruby and Redis

Error

Install the Geme package from the Gem source

Gem install [gemname]

Install the Geme package locally

Gem install-l [gemname] .gem

# gem install-l redis-4.1.0.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

Reason for reporting an error

Missing zlib library dependencies

Solve the error report

1 install the zlib library first

Yum install zlib-devel

2 integrate zlib library into Ruby environment

Enter the relevant directory # cd ruby-2.3.8/ext/zlib# ruby extconf.rb checking for deflateReset () in-lz... Yeschecking for zlib.h... Yeschecking for crc32_combine () in zlib.h... Yeschecking for adler32_combine () in zlib.h... Yeschecking for z_crc_t in zlib.h... Yescreating Makefile# makelinking shared-object zlib.so# make install/bin/install-c-m 0755 zlib.so / usr/local/ruby/lib/ruby/site_ruby/2.3.0/x86_64-linux

Reinstallation succeeded

The above is all the contents of the article "how to report an error in gem install redis". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Environment management article language what to do content tools interfaces plug-ins programs scripts success not so much reasons most Times more servers standards formats Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS Docker vpn Microsoft