Redis创建分布式集群,报错Traceback (most recent call last)
< 返回列表时间: 2019-12-23来源:OSCHINA
【围观】麒麟芯片遭打压成绝版,华为亿元投入又砸向了哪里?>>>
备注:防止网络过慢,文末 Q 群可以获取到所需文件。
报错: Traceback (most recent call last): 2: from ./redis-trib.rb:25:in `<main>' 1: from /usr/local/ruby/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' /usr/local/ruby/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- redis (LoadError)
原因:
缺少 redis 的相关依赖,需要通过 gem 安装
解决: # gem install redis
安装成功后重新执行创建指令即可成功。如果执行命令报错,则继续向下进行。
重新安装高版本的ruby
安装基础依赖环境 # yum -y install gcc gcc-c++ autoconf automake libtool make zlib zlib-devel openssl openssl-devel pcre-devel p7zip tcl
准备安装包 # wget https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.gz # tar zxf ruby-2.6.5.tar.gz # ./configure --prefix=/usr/local/ruby # make && make install //时间估计在5分钟左右 # gem sources --remove https://rubygems.org/ //删除原有源 # gem sources -a https://gems.ruby-china.com/ //使用国内源 # gem sources –l # gem install net-ssh -v 2.10.1.rc1 # gem install net-sftp # gem install net-scp # gem install redis //安装redis依赖
加群备注:Wybaron

群内:文件->00_安装包->搜索“ruby”即可
热门排行