Redis 编译安装报错解决

编译安装redis 报错

执行时报错
cd /redis-3.0.6/
gem install -l ./redis-3.2.1.gem
gem install redis

报错信息
ERROR:  Loading command: install (LoadError)

    no such file to load -- zlib

ERROR:  While executing gem ... (NameError)

    uninitialized constant Gem::Commands::InstallCommand

解决方法
yum install zlib-devel或者
下载安装包zlib-devel-1.2.3-29.el6.x86_64.rpm
rpm -ivh zlib-devel-1.2.3-29.el6.x86_64.rpm
cd  ruby-1.8.7-p374/ext/zlib
ruby extconf.rb  
make  
make install

再次进入执行
cd /redis-3.0.6/
gem install -l ./redis-3.2.1.gem
gem install redis

你可能感兴趣的:(Redis 编译安装报错解决)