我卸载了 redis,然后在我的 ubuntu 20.04.6 LTS 上重新安装。出现此错误sudo apt-get install redis
。
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
redis-server redis-tools
Suggested packages:
ruby-redis
The following NEW packages will be installed:
redis redis-server redis-tools
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/1,432 kB of archives.
After this operation, 9,277 kB of additional disk space will be used.
Selecting previously unselected package redis-tools.
(Reading database ... 250491 files and directories currently installed.)
Preparing to unpack .../redis-tools_6%3a7.2.1-1rl1~focal1_amd64.deb ...
Unpacking redis-tools (6:7.2.1-1rl1~focal1) ...
Selecting previously unselected package redis-server.
Preparing to unpack .../redis-server_6%3a7.2.1-1rl1~focal1_amd64.deb ...
Unpacking redis-server (6:7.2.1-1rl1~focal1) ...
Selecting previously unselected package redis.
Preparing to unpack .../redis_6%3a7.2.1-1rl1~focal1_all.deb ...
Unpacking redis (6:7.2.1-1rl1~focal1) ...
Setting up redis-tools (6:7.2.1-1rl1~focal1) ...
Setting up redis-server (6:7.2.1-1rl1~focal1) ...
Job for redis-server.service failed because the control process exited with error code.
See "systemctl status redis-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript redis-server, action "start" failed.
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/redis-server.service.d
└─override.conf
Active: activating (auto-restart) (Result: exit-code) since Mon 2023-10-16 13:00:20 PDT; 5ms ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 2419910 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
Main PID: 2419910 (code=exited, status=1/FAILURE)
Status: "Redis is loading..."
dpkg: error processing package redis-server (--configure):
installed redis-server package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of redis:
redis depends on redis-server (<< 6:7.2.1-1rl1~focal1.1~); however:
Package redis-server is not configured yet.
redis depends on redis-server (>= 6:7.2.1-1rl1~focal1); however:
Package redis-server is not configured yet.
dpkg: error processing package redis (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.22) ...
Errors were encountered while processing:
redis-server
redis
这就是sudo systemctl status redis-server
返回的结果
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/redis-server.service.d
└─override.conf
Active: failed (Result: exit-code) since Mon 2023-10-16 13:02:44 PDT; 6min ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 2422809 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
Main PID: 2422809 (code=exited, status=1/FAILURE)
Status: "Redis is loading..."
Oct 16 13:02:44 VAN-904647-PC1 systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 5.
Oct 16 13:02:44 VAN-904647-PC1 systemd[1]: Stopped Advanced key-value store.
Oct 16 13:02:44 VAN-904647-PC1 systemd[1]: redis-server.service: Start request repeated too quickly.
Oct 16 13:02:44 VAN-904647-PC1 systemd[1]: redis-server.service: Failed with result 'exit-code'.
Oct 16 13:02:44 VAN-904647-PC1 systemd[1]: Failed to start Advanced key-value store.
我可以在 cli 中启动 redis-server。每次我尝试使用 时都会出现此错误apt install
。有什么帮助吗?