centos系统redis-dump安装

news2025/5/23 16:18:06

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 Resolution

Dependencies Resolved

============================================================================================================================================================================================
 Package                                           Arch                                   Version                                             Repository                               Size
============================================================================================================================================================================================
Installing:
 autoconf                                          noarch                                 2.69-11.el7                                         base                                    701 k
 automake                                          noarch                                 1.13.4-3.el7                                        base                                    679 k
 bison                                             x86_64                                 3.0.4-2.el7                                         base                                    674 k
 bzip2                                             x86_64                                 1.0.6-13.el7                                        base                                     52 k
 libffi-devel                                      x86_64                                 3.0.13-19.el7                                       base                                     23 k
 libtool                                           x86_64                                 2.4.2-22.el7_3                                      base                                    588 k
 libyaml-devel                                     x86_64                                 0.1.4-11.el7_0                                      base                                     82 k
 sqlite-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 k
 openssl-devel                                     x86_64                                 1:1.0.2k-26.el7_9                                   updates                                 1.5 M
 zlib                                              x86_64                                 1.2.7-21.el7_9                                      updates                                  90 k
 zlib-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 k
 perl-Test-Harness                                 noarch                                 3.28-3.el7                                          base                                    302 k
 perl-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 k
 openssl                                           x86_64                                 1:1.0.2k-26.el7_9                                   updates                                 494 k
 openssl-libs                                      x86_64                                 1:1.0.2k-26.el7_9                                   updates                                 1.2 M

Transaction 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 transaction
  Updating   : zlib-1.2.7-21.el7_9.x86_64                                                                                                                                              1/25
  Updating   : 1:openssl-libs-1.0.2k-26.el7_9.x86_64                                                                                                                                   2/25
  Updating   : libcurl-7.29.0-59.el7_9.2.x86_64                                                                                                                                        3/25
  Updating   : zlib-devel-1.2.7-21.el7_9.x86_64                                                                                                                                        4/25
  Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                                     5/25
  Installing : autoconf-2.69-11.el7.noarch                                                                                                                                             6/25
  Installing : perl-Thread-Queue-3.02-2.el7.noarch                                                                                                                                     7/25
  Installing : perl-Test-Harness-3.28-3.el7.noarch                                                                                                                                     8/25
  Installing : automake-1.13.4-3.el7.noarch                                                                                                                                            9/25
  Installing : libtool-2.4.2-22.el7_3.x86_64                                                                                                                                          10/25
  Updating   : 1:openssl-devel-1.0.2k-26.el7_9.x86_64                                                                                                                                 11/25
  Updating   : curl-7.29.0-59.el7_9.2.x86_64                                                                                                                                          12/25
  Updating   : 1:openssl-1.0.2k-26.el7_9.x86_64                                                                                                                                       13/25
  Installing : sqlite-devel-3.7.17-8.el7_7.1.x86_64                                                                                                                                   14/25
  Installing : bison-3.0.4-2.el7.x86_64                                                                                                                                               15/25
  Installing : bzip2-1.0.6-13.el7.x86_64                                                                                                                                              16/25
  Installing : libffi-devel-3.0.13-19.el7.x86_64                                                                                                                                      17/25
  Installing : libyaml-devel-0.1.4-11.el7_0.x86_64                                                                                                                                    18/25
  Cleanup    : 1:openssl-devel-1.0.2k-25.el7_9.x86_64                                                                                                                                 19/25
  Cleanup    : 1:openssl-1.0.2k-25.el7_9.x86_64                                                                                                                                       20/25
  Cleanup    : curl-7.29.0-59.el7_9.1.x86_64                                                                                                                                          21/25
  Cleanup    : zlib-devel-1.2.7-20.el7_9.x86_64                                                                                                                                       22/25
  Cleanup    : libcurl-7.29.0-59.el7_9.1.x86_64                                                                                                                                       23/25
  Cleanup    : 1:openssl-libs-1.0.2k-25.el7_9.x86_64                                                                                                                                  24/25
  Cleanup    : zlib-1.2.7-20.el7_9.x86_64                                                                                                                                             25/25
  Verifying  : libyaml-devel-0.1.4-11.el7_0.x86_64                                                                                                                                     1/25
  Verifying  : libcurl-7.29.0-59.el7_9.2.x86_64                                                                                                                                        2/25
  Verifying  : libffi-devel-3.0.13-19.el7.x86_64                                                                                                                                       3/25
  Verifying  : automake-1.13.4-3.el7.noarch                                                                                                                                            4/25
  Verifying  : zlib-1.2.7-21.el7_9.x86_64                                                                                                                                              5/25
  Verifying  : 1:openssl-devel-1.0.2k-26.el7_9.x86_64                                                                                                                                  6/25
  Verifying  : bzip2-1.0.6-13.el7.x86_64                                                                                                                                               7/25
  Verifying  : perl-Test-Harness-3.28-3.el7.noarch                                                                                                                                     8/25
  Verifying  : 1:openssl-libs-1.0.2k-26.el7_9.x86_64                                                                                                                                   9/25
  Verifying  : perl-Thread-Queue-3.02-2.el7.noarch                                                                                                                                    10/25
  Verifying  : zlib-devel-1.2.7-21.el7_9.x86_64                                                                                                                                       11/25
  Verifying  : 1:openssl-1.0.2k-26.el7_9.x86_64                                                                                                                                       12/25
  Verifying  : libtool-2.4.2-22.el7_3.x86_64                                                                                                                                          13/25
  Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                                    14/25
  Verifying  : curl-7.29.0-59.el7_9.2.x86_64                                                                                                                                          15/25
  Verifying  : bison-3.0.4-2.el7.x86_64                                                                                                                                               16/25
  Verifying  : sqlite-devel-3.7.17-8.el7_7.1.x86_64                                                                                                                                   17/25
  Verifying  : autoconf-2.69-11.el7.noarch                                                                                                                                            18/25
  Verifying  : zlib-devel-1.2.7-20.el7_9.x86_64                                                                                                                                       19/25
  Verifying  : 1:openssl-1.0.2k-25.el7_9.x86_64                                                                                                                                       20/25
  Verifying  : 1:openssl-libs-1.0.2k-25.el7_9.x86_64                                                                                                                                  21/25
  Verifying  : 1:openssl-devel-1.0.2k-25.el7_9.x86_64                                                                                                                                 22/25
  Verifying  : libcurl-7.29.0-59.el7_9.1.x86_64                                                                                                                                       23/25
  Verifying  : curl-7.29.0-59.el7_9.1.x86_64                                                                                                                                          24/25
  Verifying  : zlib-1.2.7-20.el7_9.x86_64                                                                                                                                             25/25

Installed:
  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.el7
  libtool.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.1

Dependency 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.el7

Updated:
  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_9

Dependency 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_9

Complete!

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 stable

Downloading 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 server

Could 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  Current
                                 Dload  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?  yaml
        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: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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2384002.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

乘最多水的容器 | 算法 | 给定一个整数数组。有n条垂线。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。

在我们日常生活中&#xff0c;蓄水似乎是一个极为朴素的物理行为&#xff1a;两堵墙之间&#xff0c;注入水&#xff0c;看谁能装得更多。可如果换个角度&#xff0c;从算法的视角去看这个问题&#xff0c;它会变得怎样&#xff1f;你是否意识到&#xff0c;这样一个简单的问题…

【Java高阶面经:数据库篇】19、分库分表查询困境:无分库分表键时的高效应对

一、分库分表下的无分片键查询困境 在分布式数据库架构中,分库分表通过分片键(如买家ID)将数据分散存储,显著提升了单表性能和系统扩展性。然而,当业务需要从非分片键维度(如卖家ID)进行查询时,传统架构暴露出以下核心问题: 1.1 跨分片扫描的性能灾难 数据分散性:以…

spring中的BeanFactoryAware接口详解

一、接口定义与核心作用 BeanFactoryAware 是 Spring 框架提供的一个回调接口&#xff0c;允许 Bean 在初始化阶段获取其所属的 BeanFactory 实例。该接口定义如下&#xff1a; public interface BeanFactoryAware {void setBeanFactory(BeanFactory beanFactory) throws Bea…

Unity Hub打不开项目一直在加载

Unity Hub打不开项目&#xff0c;一直在加载。 运行环境&#xff1a;win10 解决方法&#xff1a;退还个人许可证&#xff0c;退出UnityHub重新登录后,再次获取个人许可证 Tips&#xff1a; 国内连续超过三天不登陆就需要激活一次。&#xff08;每天登陆一次会自动续时间吗&…

蓝桥杯19681 01背包

问题描述 有 N 件物品和一个体积为 M 的背包。第 i 个物品的体积为 vi​&#xff0c;价值为 wi​。每件物品只能使用一次。 请问可以通过什么样的方式选择物品&#xff0c;使得物品总体积不超过 M 的情况下总价值最大&#xff0c;输出这个最大价值即可。 输入格式 第一行输…

ElasticSearch导读

ElasticSearch 简介&#xff1a;ElasticSearch简称ES是一个开源的分布式搜素和数据分析引擎。是使用Java开发并且是当前最流行的开源的企业级搜索引擎&#xff0c;能够达到近实时搜索&#xff0c;它专门设计用于处理大规模的文本数据和实现高性能的全文搜索。它基于 Apache Luc…

【机器学习】 关于外插修正随机梯度方法的数值实验

1. 随机梯度下降&#xff08;SGD&#xff09; 迭代格式&#xff1a; x k 1 x k − η k ∇ f i ( x k ) x_{k1} x_k - \eta_k \nabla f_i(x_k) xk1​xk​−ηk​∇fi​(xk​) 其中&#xff0c; η k \eta_k ηk​ 为步长&#xff08;可能递减&#xff09;&#xff0c; ∇ f…

结构型:组合模式

目录 1、核心思想 2、实现方式 2.1 模式结构 2.2 实现案例 3、优缺点分析 4、适用场景 1、核心思想 目的&#xff1a;将总是在重复、迭代地显示的某种自相似性的结构&#xff08;部分与整体结构特征相似&#xff09;&#xff0c;例如树形结构&#xff0c;以统一的方式处…

windows 删除文件夹提示“操作无法完成,因为其中的文件夹或文件已在另一程序中打开”

windows 删除文件夹提示“操作无法完成&#xff0c;因为其中的文件夹或文件已在另一程序中打开” tomact已经关闭了&#xff0c;刚开始怀疑是tomcat关闭不彻底&#xff0c;但是任务管理器–》进程里根本没有java的进程了&#xff0c;由于是医院服务器、不方便重启 解决方法&am…

微信小程序中,解决lottie动画在真机不显示的问题

api部分 export function getRainInfo() {return onlineRequest({url: /ball/recruit/getRainInfo,method: get}); }data存储json数据 data&#xff1a;{rainJson:{} }onLoad方法获取json数据 onLoad(options) {let that thisgetRainInfo().then((res)>{that.setData({r…

Wireshark 抓包工具使用

1.下载地址 https://2.na.dl.wireshark.org/win64/ 或者 Wireshark Go Deep 2.安装并打开 3.电脑设置热点&#xff0c;手机连接热点 4.手机发起网络请求&#xff0c;工具上选择WLAN。或者本地连接 5.点击查看抓包数据&#xff0c;过滤。最好用发送端ip过滤&#xff0c;s…

大语言模型(LLM)本身是无状态的,怎么固化记忆

大语言模型(LLM)本身是无状态的,无法直接“记住”历史对话或用户特定信息 大语言模型(LLM)本身是无状态的,无法直接“记住”历史对话或用户特定信息,但可以通过架构改进、外部记忆整合、训练方法优化等方案实现上下文记忆能力。 一、模型内部记忆增强:让LLM“记住”…

JUC入门(六)

12、四大函数式接口 Consumer<T>&#xff08;消费者接口&#xff09; 源码 功能 接收一个参数T&#xff0c;不返回任何结果。主要用于消费操作&#xff0c;例如打印日志、更新状态等。 使用场景 遍历集合并执行操作。 对象的字段赋值。 代码示例 import java.util.…

window xampp apache使用腾讯云ssl证书配置https

下载腾讯云ssl证书&#xff1a; 编辑Apache根目录下 conf/httpd.conf 文件&#xff1a; #LoadModule ssl_module modules/mod_ssl.so和#Include conf/extra/httpd-ssl.conf&#xff0c;去掉前面的#号注释。 编辑Apache根目录下 conf/httpd-ssl.conf 文件&#xff1a; <Vi…

逆向音乐APP:Python爬虫获取音乐榜单 (1)

1. 引言 在数字音乐时代&#xff0c;许多平台如音乐有榜单&#xff0c;限制非付费用户访问高音质或独家内容。然而&#xff0c;从技术研究的角度来看&#xff0c;我们可以通过逆向工程和Python爬虫技术解音乐的API接口&#xff0c;获取付费音乐的播放链接。 2. 技术准备 在当…

支持向量存储:PostgresSQL及pgvector扩展详细安装步骤!老工程接入RAG功能必备!

之前文章和大家分享过&#xff0c;将会出一篇专栏&#xff08;从电脑装ubuntu系统&#xff0c;到安装ubuntu的常用基础软件&#xff1a;jdk、python、node、nginx、maven、supervisor、minio、docker、git、mysql、redis、postgresql、mq、ollama等&#xff09;&#xff0c;目前…

idea常用配置 properties中文输出乱码

propertis配置中文乱码 源码和编译后的都是中文 程序输入效果 idea配置3处 程序输出效果 自定义注释模板 IDEA 中有以下两种配置模板。 File and Code Templates Live Templates File and Code Templates File and Code Templates 用来配置文件和代码模板&#xff0c;即…

day1 大模型学习 Qwen系列学习

Qwen 模型学习笔记:RM、SFT 与 RLHF 技术解析 一、Qwen 模型概述 Qwen 是阿里巴巴开源的大型语言模型系列,旨在实现通用人工智能(AGI)。其架构包括基础语言模型(如 Qwen-7B、Qwen-14B、Qwen-72B)和经过后训练的对话模型(如 Qwen-Chat)。后训练主要通过 SFT 和 RLHF 技…

Unity3D仿星露谷物语开发47之砍树时落叶特效

1、目标 当橡树被砍伐时的落叶粒子效果。 2、创建粒子物体 Hierarchy -> PersistentScene下创建新物体命名为DeciduousLeavesFalling。 添加Particle System组件。 基础配置如下&#xff1a;&#xff08;暂时勾选Looping实时可以看生成效果&#xff0c;后面反选即可&am…

第十节第六部分:常见API:DateTimeFormatter、Period、Duration

DateTimeFormatter类常用方法 Period类常用方法 Duration类常用方法 总结 代码&#xff1a; 代码一&#xff1a;DateTimeFormatter类常用方法 package com.itheima.jdk8_time;import java.time.LocalDateTime; import java.time.format.DateTimeFormatter;public class DateT…