按照此处的指示:Redis 快速入门我在 Ubuntu 18.04.01 服务器版中安装了最新的稳定 Redis 版本:下载.redis.io/redis-stable.tar.gz 并测试了编译结果:
\o/ All tests passed without errors!
根据建议,我将 redis-server 和 redis-cli 复制到 /usr/local/bin 中:
marco@pc01:~/redis-stable$ sudo cp src/redis-server /usr/local/bin/
marco@pc01:~/redis-stable$ sudo cp src/redis-cli /usr/local/bin/
但是当执行 redis-server 二进制文件时,它说它无法处理 RDB 格式版本 9
marco@pc01:~$ redis-server
11700:C 18 Apr 08:18:52.007 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
11700:C 18 Apr 08:18:52.007 # Redis version=4.0.9, bits=64, commit=00000000, modified=0,
pid=11700, just started
11700:C 18 Apr 08:18:52.007 # Warning: no config file specified, using the default config. In
order to specify a config file use redis-server /path/to/redis.conf
11700:M 18 Apr 08:18:52.007 * Increased maximum number of open files to 10032 (it was
originally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 4.0.9 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 11700
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
11700:M 18 Apr 08:18:52.008 # Server initialized
11700:M 18 Apr 08:18:52.008 # Can't handle RDB format version 9
11700:M 18 Apr 08:18:52.008 # Fatal error loading the DB: Invalid argument. Exiting.
寻找一些提示我发现了这一点:无法处理 RDB 格式版本 8 解决方案是使用最新版本的 redis。但我下载了最新的稳定版 Redis!那么...该如何解决这个问题?
期待您的帮助。Marco
正如下面的评论所说,我通过删除 /home/marco/dump.rdb 文件解决了这个问题。