About solving the problem of ruby source installation gem install error

Because ruby ​​needs to be installed for redis cluster, gem install redis install redis interface error after source code installation

solution:

Make sure the host has zlib installed, no installation is performed

yum -y install zlib zlib-devel

Go back to the unzipped ruby ​​folder

1 cd ext/zlib/
2 ruby extconf.rb
3 sed -i s#\$\(top_srcdir\)#../..# Makefile
4 make
5 make install

After the installation is successful, execute gem install redis and report an error

solution:

Make sure openssl openssl-devel is installed, if not, execute

yum -y install openssl openssl-devel

Go back to the ruby ​​decompression directory and execute the following command

cd ext/openssl/
ruby extconf.rb
sed -i 's#\$(top_srcdir)#../..#g' Makefile
make
make install

Execute gem install redis successfully

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324522548&siteId=291194637