当前位置: 首页 > news >正文

centos系统redis-dump安装

1. ​Ruby 环境​

Redis-dump 是一个 Ruby 工具,需先安装 Ruby 和 RubyGems。

安装依赖​:

sudo yum install -y curl gpg2 gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison sqlite-devel

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base                                                                                                                                                                 | 3.6 kB  00:00:00
epel                                                                                                                                                                 | 4.3 kB  00:00:00
extras                                                                                                                                                               | 2.9 kB  00:00:00
updates                                                                                                                                                              | 2.9 kB  00:00:00
No package gpg2 available.
Package gcc-c++-4.8.5-44.el7.x86_64 already installed and latest version
Package patch-2.7.1-12.el7_7.x86_64 already installed and latest version
Package readline-6.2-11.el7.x86_64 already installed and latest version
Package readline-devel-6.2-11.el7.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package autoconf.noarch 0:2.69-11.el7 will be installed
--> Processing Dependency: perl(Data::Dumper) for package: autoconf-2.69-11.el7.noarch
---> Package automake.noarch 0:1.13.4-3.el7 will be installed
--> Processing Dependency: perl(Thread::Queue) for package: automake-1.13.4-3.el7.noarch
--> Processing Dependency: perl(TAP::Parser) for package: automake-1.13.4-3.el7.noarch
---> Package bison.x86_64 0:3.0.4-2.el7 will be installed
---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
---> Package curl.x86_64 0:7.29.0-59.el7_9.1 will be updated
---> Package curl.x86_64 0:7.29.0-59.el7_9.2 will be an update
--> Processing Dependency: libcurl = 7.29.0-59.el7_9.2 for package: curl-7.29.0-59.el7_9.2.x86_64
---> Package libffi-devel.x86_64 0:3.0.13-19.el7 will be installed
---> Package libtool.x86_64 0:2.4.2-22.el7_3 will be installed
---> Package libyaml-devel.x86_64 0:0.1.4-11.el7_0 will be installed
---> Package openssl-devel.x86_64 1:1.0.2k-25.el7_9 will be updated
---> Package openssl-devel.x86_64 1:1.0.2k-26.el7_9 will be an update
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-26.el7_9 for package: 1:openssl-devel-1.0.2k-26.el7_9.x86_64
---> Package sqlite-devel.x86_64 0:3.7.17-8.el7_7.1 will be installed
---> Package zlib.x86_64 0:1.2.7-20.el7_9 will be updated
---> Package zlib.x86_64 0:1.2.7-21.el7_9 will be an update
---> Package zlib-devel.x86_64 0:1.2.7-20.el7_9 will be updated
---> Package zlib-devel.x86_64 0:1.2.7-21.el7_9 will be an update
--> Running transaction check
---> Package libcurl.x86_64 0:7.29.0-59.el7_9.1 will be updated
---> Package libcurl.x86_64 0:7.29.0-59.el7_9.2 will be an update
---> Package openssl-libs.x86_64 1:1.0.2k-25.el7_9 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-25.el7_9 for package: 1:openssl-1.0.2k-25.el7_9.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-26.el7_9 will be an update
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
---> Package perl-Test-Harness.noarch 0:3.28-3.el7 will be installed
---> Package perl-Thread-Queue.noarch 0:3.02-2.el7 will be installed
--> Running transaction check
---> Package openssl.x86_64 1:1.0.2k-25.el7_9 will be updated
---> Package openssl.x86_64 1:1.0.2k-26.el7_9 will be an update
--> Finished Dependency ResolutionDependencies Resolved============================================================================================================================================================================================Package                                           Arch                                   Version                                             Repository                               Size
============================================================================================================================================================================================
Installing:autoconf                                          noarch                                 2.69-11.el7                                         base                                    701 kautomake                                          noarch                                 1.13.4-3.el7                                        base                                    679 kbison                                             x86_64                                 3.0.4-2.el7                                         base                                    674 kbzip2                                             x86_64                                 1.0.6-13.el7                                        base                                     52 klibffi-devel                                      x86_64                                 3.0.13-19.el7                                       base                                     23 klibtool                                           x86_64                                 2.4.2-22.el7_3                                      base                                    588 klibyaml-devel                                     x86_64                                 0.1.4-11.el7_0                                      base                                     82 ksqlite-devel                                      x86_64                                 3.7.17-8.el7_7.1                                    base                                    104 k
Updating:curl                                              x86_64                                 7.29.0-59.el7_9.2                                   updates                                 271 kopenssl-devel                                     x86_64                                 1:1.0.2k-26.el7_9                                   updates                                 1.5 Mzlib                                              x86_64                                 1.2.7-21.el7_9                                      updates                                  90 kzlib-devel                                        x86_64                                 1.2.7-21.el7_9                                      updates                                  50 k
Installing for dependencies:perl-Data-Dumper                                  x86_64                                 2.145-3.el7                                         base                                     47 kperl-Test-Harness                                 noarch                                 3.28-3.el7                                          base                                    302 kperl-Thread-Queue                                 noarch                                 3.02-2.el7                                          base                                     17 k
Updating for dependencies:libcurl                                           x86_64                                 7.29.0-59.el7_9.2                                   updates                                 223 kopenssl                                           x86_64                                 1:1.0.2k-26.el7_9                                   updates                                 494 kopenssl-libs                                      x86_64                                 1:1.0.2k-26.el7_9                                   updates                                 1.2 MTransaction Summary
============================================================================================================================================================================================
Install  8 Packages (+3 Dependent packages)
Upgrade  4 Packages (+3 Dependent packages)Total download size: 7.0 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/18): autoconf-2.69-11.el7.noarch.rpm                                                                                                                              | 701 kB  00:00:00
(2/18): automake-1.13.4-3.el7.noarch.rpm                                                                                                                             | 679 kB  00:00:00
(3/18): bison-3.0.4-2.el7.x86_64.rpm                                                                                                                                 | 674 kB  00:00:00
(4/18): bzip2-1.0.6-13.el7.x86_64.rpm                                                                                                                                |  52 kB  00:00:00
(5/18): libffi-devel-3.0.13-19.el7.x86_64.rpm                                                                                                                        |  23 kB  00:00:00
(6/18): libcurl-7.29.0-59.el7_9.2.x86_64.rpm                                                                                                                         | 223 kB  00:00:00
(7/18): curl-7.29.0-59.el7_9.2.x86_64.rpm                                                                                                                            | 271 kB  00:00:00
(8/18): openssl-1.0.2k-26.el7_9.x86_64.rpm                                                                                                                           | 494 kB  00:00:00
(9/18): openssl-devel-1.0.2k-26.el7_9.x86_64.rpm                                                                                                                     | 1.5 MB  00:00:00
(10/18): libtool-2.4.2-22.el7_3.x86_64.rpm                                                                                                                           | 588 kB  00:00:00
(11/18): openssl-libs-1.0.2k-26.el7_9.x86_64.rpm                                                                                                                     | 1.2 MB  00:00:00
(12/18): perl-Data-Dumper-2.145-3.el7.x86_64.rpm                                                                                                                     |  47 kB  00:00:00
(13/18): perl-Test-Harness-3.28-3.el7.noarch.rpm                                                                                                                     | 302 kB  00:00:00
(14/18): perl-Thread-Queue-3.02-2.el7.noarch.rpm                                                                                                                     |  17 kB  00:00:00
(15/18): sqlite-devel-3.7.17-8.el7_7.1.x86_64.rpm                                                                                                                    | 104 kB  00:00:00
(16/18): libyaml-devel-0.1.4-11.el7_0.x86_64.rpm                                                                                                                     |  82 kB  00:00:00
(17/18): zlib-1.2.7-21.el7_9.x86_64.rpm                                                                                                                              |  90 kB  00:00:00
(18/18): zlib-devel-1.2.7-21.el7_9.x86_64.rpm                                                                                                                        |  50 kB  00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                        15 MB/s | 7.0 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionUpdating   : zlib-1.2.7-21.el7_9.x86_64                                                                                                                                              1/25Updating   : 1:openssl-libs-1.0.2k-26.el7_9.x86_64                                                                                                                                   2/25Updating   : libcurl-7.29.0-59.el7_9.2.x86_64                                                                                                                                        3/25Updating   : zlib-devel-1.2.7-21.el7_9.x86_64                                                                                                                                        4/25Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                                     5/25Installing : autoconf-2.69-11.el7.noarch                                                                                                                                             6/25Installing : perl-Thread-Queue-3.02-2.el7.noarch                                                                                                                                     7/25Installing : perl-Test-Harness-3.28-3.el7.noarch                                                                                                                                     8/25Installing : automake-1.13.4-3.el7.noarch                                                                                                                                            9/25Installing : libtool-2.4.2-22.el7_3.x86_64                                                                                                                                          10/25Updating   : 1:openssl-devel-1.0.2k-26.el7_9.x86_64                                                                                                                                 11/25Updating   : curl-7.29.0-59.el7_9.2.x86_64                                                                                                                                          12/25Updating   : 1:openssl-1.0.2k-26.el7_9.x86_64                                                                                                                                       13/25Installing : sqlite-devel-3.7.17-8.el7_7.1.x86_64                                                                                                                                   14/25Installing : bison-3.0.4-2.el7.x86_64                                                                                                                                               15/25Installing : bzip2-1.0.6-13.el7.x86_64                                                                                                                                              16/25Installing : libffi-devel-3.0.13-19.el7.x86_64                                                                                                                                      17/25Installing : libyaml-devel-0.1.4-11.el7_0.x86_64                                                                                                                                    18/25Cleanup    : 1:openssl-devel-1.0.2k-25.el7_9.x86_64                                                                                                                                 19/25Cleanup    : 1:openssl-1.0.2k-25.el7_9.x86_64                                                                                                                                       20/25Cleanup    : curl-7.29.0-59.el7_9.1.x86_64                                                                                                                                          21/25Cleanup    : zlib-devel-1.2.7-20.el7_9.x86_64                                                                                                                                       22/25Cleanup    : libcurl-7.29.0-59.el7_9.1.x86_64                                                                                                                                       23/25Cleanup    : 1:openssl-libs-1.0.2k-25.el7_9.x86_64                                                                                                                                  24/25Cleanup    : zlib-1.2.7-20.el7_9.x86_64                                                                                                                                             25/25Verifying  : libyaml-devel-0.1.4-11.el7_0.x86_64                                                                                                                                     1/25Verifying  : libcurl-7.29.0-59.el7_9.2.x86_64                                                                                                                                        2/25Verifying  : libffi-devel-3.0.13-19.el7.x86_64                                                                                                                                       3/25Verifying  : automake-1.13.4-3.el7.noarch                                                                                                                                            4/25Verifying  : zlib-1.2.7-21.el7_9.x86_64                                                                                                                                              5/25Verifying  : 1:openssl-devel-1.0.2k-26.el7_9.x86_64                                                                                                                                  6/25Verifying  : bzip2-1.0.6-13.el7.x86_64                                                                                                                                               7/25Verifying  : perl-Test-Harness-3.28-3.el7.noarch                                                                                                                                     8/25Verifying  : 1:openssl-libs-1.0.2k-26.el7_9.x86_64                                                                                                                                   9/25Verifying  : perl-Thread-Queue-3.02-2.el7.noarch                                                                                                                                    10/25Verifying  : zlib-devel-1.2.7-21.el7_9.x86_64                                                                                                                                       11/25Verifying  : 1:openssl-1.0.2k-26.el7_9.x86_64                                                                                                                                       12/25Verifying  : libtool-2.4.2-22.el7_3.x86_64                                                                                                                                          13/25Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                                    14/25Verifying  : curl-7.29.0-59.el7_9.2.x86_64                                                                                                                                          15/25Verifying  : bison-3.0.4-2.el7.x86_64                                                                                                                                               16/25Verifying  : sqlite-devel-3.7.17-8.el7_7.1.x86_64                                                                                                                                   17/25Verifying  : autoconf-2.69-11.el7.noarch                                                                                                                                            18/25Verifying  : zlib-devel-1.2.7-20.el7_9.x86_64                                                                                                                                       19/25Verifying  : 1:openssl-1.0.2k-25.el7_9.x86_64                                                                                                                                       20/25Verifying  : 1:openssl-libs-1.0.2k-25.el7_9.x86_64                                                                                                                                  21/25Verifying  : 1:openssl-devel-1.0.2k-25.el7_9.x86_64                                                                                                                                 22/25Verifying  : libcurl-7.29.0-59.el7_9.1.x86_64                                                                                                                                       23/25Verifying  : curl-7.29.0-59.el7_9.1.x86_64                                                                                                                                          24/25Verifying  : zlib-1.2.7-20.el7_9.x86_64                                                                                                                                             25/25Installed:autoconf.noarch 0:2.69-11.el7     automake.noarch 0:1.13.4-3.el7          bison.x86_64 0:3.0.4-2.el7               bzip2.x86_64 0:1.0.6-13.el7   libffi-devel.x86_64 0:3.0.13-19.el7libtool.x86_64 0:2.4.2-22.el7_3   libyaml-devel.x86_64 0:0.1.4-11.el7_0   sqlite-devel.x86_64 0:3.7.17-8.el7_7.1Dependency Installed:perl-Data-Dumper.x86_64 0:2.145-3.el7                         perl-Test-Harness.noarch 0:3.28-3.el7                         perl-Thread-Queue.noarch 0:3.02-2.el7Updated:curl.x86_64 0:7.29.0-59.el7_9.2              openssl-devel.x86_64 1:1.0.2k-26.el7_9              zlib.x86_64 0:1.2.7-21.el7_9              zlib-devel.x86_64 0:1.2.7-21.el7_9Dependency Updated:libcurl.x86_64 0:7.29.0-59.el7_9.2                            openssl.x86_64 1:1.0.2k-26.el7_9                            openssl-libs.x86_64 1:1.0.2k-26.el7_9Complete!

2. ​导入 RVM 官方 GPG 密钥

某些 Ruby Gem 可能需要编译本地扩展,需安装构建工具和依赖库:

gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BD
➜  /opt gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BD
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: "7D2BAF1CF37B13E2069D6956105BD0E739499BD" not a key ID: skipping
gpg: no keyserver known (use option --keyserver)
gpg: keyserver receive failed: Syntax error in URI

3. ​安装 RVM

直接通过 RubyGems 安装:

curl -sSL https://get.rvm.io | bash -s stable
➜  /opt curl -sSL https://get.rvm.io | bash -s stableDownloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
curl: (52) Empty reply from serverCould not download 'https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc'.curl returned status '52'.Creating group 'rvm'
Installing RVM to /usr/local/rvm/source /etc/profile
Installation of RVM in /usr/local/rvm/ is almost complete:* First you need to add all users that will be using rvm to 'rvm' group,and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.* To start using RVM you need to run `source /etc/profile.d/rvm.sh`in all your open shell windows, in rare cases you need to reopen all shell windows.* Please do NOT forget to add your users to the rvm group.The installer no longer auto-adds root or users to the rvm group. Admins must do this.Also, please note that group memberships are ONLY evaluated at login time.This means that users must log out then back in before group membership takes effect!
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.👉  Donate: https://opencollective.com/rvm/donate

加载 RVM 环境(需重启终端或运行)

source /etc/profile.d/rvm.sh

4.安装ruby

rvm install 3.1.2
➜  ~ rvm install 3.1.2
Searching for binary rubies, this might take some time.
No binary rubies available for: centos/7/x86_64/ruby-3.1.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-3.1.2, this may take a while depending on your cpu(s)...
ruby-3.1.2 - #downloading ruby-3.1.2, this may take a while depending on your connection...
** Resuming transfer from byte position 9224192% Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed
100 10.8M  100 10.8M    0     0   100k      0  0:01:50  0:01:50 --:--:-- 1943k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-3.1.2 - #extracting ruby-3.1.2 to /usr/local/rvm/src/ruby-3.1.2 - please wait
ruby-3.1.2 - #configuring - please wait
ruby-3.1.2 - #post-configuration - please wait
ruby-3.1.2 - #compiling - please wait
ruby-3.1.2 - #installing - please wait
ruby-3.1.2 - #making binaries executable - please wait
Installed rubygems 3.3.7 is newer than 3.0.9 provided with installed ruby, skipping installation, use --force to force installation.
ruby-3.1.2 - #gemset created /usr/local/rvm/gems/ruby-3.1.2@global
ruby-3.1.2 - #importing gemset /usr/local/rvm/gemsets/global.gems - please wait
ruby-3.1.2 - #generating global wrappers - please wait
ruby-3.1.2 - #gemset created /usr/local/rvm/gems/ruby-3.1.2
ruby-3.1.2 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-3.1.2 - #generating default wrappers - please wait
ruby-3.1.2 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-3.1.2 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri

验证ruby版本

➜  ~ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
➜  ~ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
# 如果有旧版本,强制使用 RVM 管理的 Ruby
rvm use 3.1.2 --default

5.安装redis-dump

➜  ~ redis-dump -v
zsh: command not found: redis-dump
➜  ~ gem install redis-dump
Fetching redis-dump-0.6.1.gem
Successfully installed redis-dump-0.6.1
Parsing documentation for redis-dump-0.6.1
Installing ri documentation for redis-dump-0.6.1
Done installing documentation for redis-dump after 0 seconds
1 gem installed

验证redis-dump

➜  ~ redis-dump -v
<internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- redis (LoadError)from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from /usr/local/rvm/gems/ruby-3.1.2/gems/redis-dump-0.6.1/lib/redis/dump.rb:7:in `<top (required)>'from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from /usr/local/rvm/gems/ruby-3.1.2/gems/redis-dump-0.6.1/exe/redis-dump:18:in `<top (required)>'from /usr/local/rvm/gems/ruby-3.1.2/bin/redis-dump:25:in `load'from /usr/local/rvm/gems/ruby-3.1.2/bin/redis-dump:25:in `<main>'from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `eval'from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `<main>'

安装reids

➜  ~ gem install redis
Fetching connection_pool-2.5.3.gem
Fetching redis-client-0.24.0.gem
Fetching redis-5.4.0.gem
Successfully installed connection_pool-2.5.3
Successfully installed redis-client-0.24.0
Successfully installed redis-5.4.0
Parsing documentation for connection_pool-2.5.3
Installing ri documentation for connection_pool-2.5.3
Parsing documentation for redis-client-0.24.0
Installing ri documentation for redis-client-0.24.0
Parsing documentation for redis-5.4.0
Installing ri documentation for redis-5.4.0
Done installing documentation for connection_pool, redis-client, redis after 1 seconds
3 gems installed

安装yajl

➜  ~ redis-dump -v
<internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- yajl (LoadError)
Did you mean?  yamlfrom <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from /usr/local/rvm/gems/ruby-3.1.2/gems/redis-dump-0.6.1/lib/redis/dump.rb:8:in `<top (required)>'from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from /usr/local/rvm/gems/ruby-3.1.2/gems/redis-dump-0.6.1/exe/redis-dump:18:in `<top (required)>'from /usr/local/rvm/gems/ruby-3.1.2/bin/redis-dump:25:in `load'from /usr/local/rvm/gems/ruby-3.1.2/bin/redis-dump:25:in `<main>'from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `eval'from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `<main>'
➜  ~ gem install yajl-ruby
Fetching yajl-ruby-1.4.3.gem
Building native extensions. This could take a while...
Successfully installed yajl-ruby-1.4.3
Parsing documentation for yajl-ruby-1.4.3
Installing ri documentation for yajl-ruby-1.4.3
Done installing documentation for yajl-ruby after 0 seconds
1 gem installed
➜ 

修复错误文件

 ~ redis-dump -v
<internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- uri/redis (LoadError)from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from /usr/local/rvm/gems/ruby-3.1.2/gems/redis-dump-0.6.1/lib/redis/dump.rb:11:in `<top (required)>'from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from /usr/local/rvm/gems/ruby-3.1.2/gems/redis-dump-0.6.1/exe/redis-dump:18:in `<top (required)>'from /usr/local/rvm/gems/ruby-3.1.2/bin/redis-dump:25:in `load'from /usr/local/rvm/gems/ruby-3.1.2/bin/redis-dump:25:in `<main>'from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `eval'from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `<main>'
➜  ~ vim /usr/local/rvm/gems/ruby-3.1.2/gems/redis-dump-0.6.1/lib/redis/dump.rb
➜ 

将require ‘uri/redis’ 修改位require ‘uri’

安装drydock

 ~ redis-dump -v
<internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- drydock (LoadError)from <internal:/usr/local/rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'from /usr/local/rvm/gems/ruby-3.1.2/gems/redis-dump-0.6.1/exe/redis-dump:19:in `<top (required)>'from /usr/local/rvm/gems/ruby-3.1.2/bin/redis-dump:25:in `load'from /usr/local/rvm/gems/ruby-3.1.2/bin/redis-dump:25:in `<main>'from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `eval'from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `<main>'
➜  ~ gem install drydock
Fetching drydock-0.6.9.gem
Successfully installed drydock-0.6.9
Parsing documentation for drydock-0.6.9
Installing ri documentation for drydock-0.6.9
Done installing documentation for drydock after 0 seconds
1 gem installed

验证redis-dump

➜  ~ redis-dump -v
redis-dump v0.6.1

相关文章:

  • FPGA开发全流程
  • bitbar环境搭建(ruby 2.4 + rails 5.0.2)
  • MCU 上电不启动的常见原因分析与排查思路
  • Transformer到底解决什么问题?
  • R语言速查表
  • 【Django】Django DRF 中如何手动调用分页器返回分页数据(APIView,action场景)
  • Windows系统编译GSL与VS2022联合编程
  • 从零基础到最佳实践:Vue.js 系列(3/10):《组件化开发入门》
  • 链表day3
  • 【初识】内网渗透——基础概念,基本工具使用
  • 远程访问家里的路由器:异地访问内网设备或指定端口网址
  • Go语言中new与make的深度解析
  • 第二章:Android常用UI控件
  • 数据库blog4_数据库软件的设计方法与实际架构
  • 安全可控的AI底座:灯塔大模型应用开发平台全面实现国产信创兼容适配认证
  • VRRP 协议
  • 使用vue2做一个生成二维码的案例【可当组件使用】
  • 结课作业01. 用户空间 MPU6050 体感鼠标驱动程序
  • 【图像大模型】基于深度对抗网络的图像超分辨率重建技术ESRGAN深度解析
  • Mac安装redis
  • 投资者网站建设/神马推广
  • 弄一个关于作文的网站怎么做/外贸推广具体是做什么
  • 网站策划的最终体现/网站建设关键词排名
  • 简阳建设厅官方网站/北京seo公司助力网络营销
  • 江苏专业做网站的公司/合肥网站排名
  • WordPress快速添加图片/windows优化大师和360哪个好