問題1:redis
執行命令:./redis-trib.rb
ruby
/usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- redis (LoadError)from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'from ./redis-trib.rb:25:in `<main>'
解決方法:下載安裝rubygem 進入解壓包中.configure make && make install ide
此時就能夠運行gem intall redis 命令,來安裝ruby執行redis的相關依賴。ui
問題2:spa
gem install redis 命令出現的問題
code
ERROR: Loading command: install (LoadError)cannot load such file -- opensslERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass
手動安裝opensll,此問題解決。
orm
問題3:ssl
接着執行命令:gem install redis
rem
ERROR: Loading command: install (LoadError)cannot load such file -- zlib
手動安裝zlib包解決(這個多是系統太純淨,沒有些包的問題)。安裝過程很少說,手動下載安裝包安裝openssl
問題4:
接着執行命令:gem install redis
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
網上搜索到的解決方法:
gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
仍是問題以舊。
解決方法:
gem sources -a https://gems.ruby-china.org/ 把https地址改爲 gem sources -a http://gems.ruby-china.org/
執行成功,查看gem source -l 鏡像地址修改爲功。