尝试使用Kubuntu 16.04 64位版本安装redis服务器,使用:
sudo apt install redis-server但在安装时接收此消息:
Setting up redis-server (2:3.0.7-1~dotdeb+6.1) ...
Job for redis-server.service failed because a timeout was exceeded. See "systemctl status redis-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript redis-server, action "start" failed.
dpkg: error processing package redis-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
redis-server
E: Sub-process /usr/bin/dpkg returned an error code (1)尝试运行"journalctl -xe“并发现如下:
redis-server.service: PID file /var/run/redis/redis-server.pid not readable (yet?) after start-post: No such file or directory有办法解决这个问题吗?
"df -h“结果:
Filesystem Size Used Avail Use% Mounted on
udev 3,9G 0 3,9G 0% /dev
tmpfs 789M 9,6M 780M 2% /run
/dev/sda2 909G 24G 840G 3% /
tmpfs 3,9G 175M 3,7G 5% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/sda1 511M 3,6M 508M 1% /boot/efi
tmpfs 789M 0 789M 0% /run/user/118
tmpfs 789M 12K 789M 1% /run/user/1000"df -h /var/run“结果:
Filesystem Size Used Avail Use% Mounted on
tmpfs 789M 9,6M 780M 2% /run发布于 2017-03-26 12:29:30
最后,我删除了从apt安装的redis,并手动从redis网站安装了最新的稳定版本。现在一切正常..。我使用这个指南:https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04
发布于 2019-07-09 22:18:40
对我来说,这个问题与港口不开放有关。所以我不得不这么做:sudo iptables -A INPUT -p tcp --dport 6379 -j ACCEPT
发布于 2021-04-10 18:47:00
您可以从Snapcraft市场安装Redis的最新稳定版本:
sudo snap安装redis
https://unix.stackexchange.com/questions/351668
复制相似问题