redis - Redis失败了。 Ubuntu 18.04

标签 redis vagrant redis-server

我正在尝试make Redis 6.0.6。,但是运行make命令时出现此错误:

(.venv) vagrant@vagrant:/vagrant/redis-6.0.6$ make
cd src && make all
make[1]: Entering directory '/vagrant/redis-6.0.6/src'
/bin/sh: 1: pkg-config: not found
    CC Makefile.dep
/bin/sh: 1: pkg-config: not found
make[1]: Warning: File 'Makefile.dep' has modification time 1.3 s in the future
    CC adlist.o
/bin/sh: 1: cc: not found
Makefile:315: recipe for target 'adlist.o' failed
make[1]: *** [adlist.o] Error 127
make[1]: Leaving directory '/vagrant/redis-6.0.6/src'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
安装pkg-config之后,我现在得到另一个错误:
(.venv) vagrant@vagrant:/vagrant/redis-6.0.6$ make
cd src && make all
make[1]: Entering directory '/vagrant/redis-6.0.6/src'
    CC Makefile.dep
make[1]: Warning: File 'Makefile.dep' has modification time 1.4 s in the future
    CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:10: fatal error: jemalloc/jemalloc.h: No such file or directory
 #include <jemalloc/jemalloc.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:315: recipe for target 'adlist.o' failed
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory '/vagrant/redis-6.0.6/src'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
编辑:
安装tcl后运行redis-test时出错:
Testing integration/replication-2
[err]: Can't start the Redis server
CONFIGURATION:always-show-logo yes
notify-keyspace-events KEA
daemonize no
pidfile /var/run/redis.pid
port 21111
timeout 0
bind 127.0.0.1
loglevel verbose
logfile ''
databases 16
latency-monitor-threshold 1
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir ./tests/tmp/server.4452.1
slave-serve-stale-data yes
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
activerehashing yes
unixsocket /vagrant/redis-6.0.6/tests/tmp/server.4452.1/socket
ERROR:4484:C 28 Aug 2020 06:28:05.075 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
4484:C 28 Aug 2020 06:28:05.076 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=4484, just started
4484:C 28 Aug 2020 06:28:05.076 # Configuration loaded
4484:M 28 Aug 2020 06:28:05.084 * Increased maximum number of open files to 10032 (it was originally set to 1024).
4484:M 28 Aug 2020 06:28:05.134 # Opening Unix socket: bind: Operation not permitted
[err]: Can't start the Redis server
CONFIGURATION:always-show-logo yes
notify-keyspace-events KEA
daemonize no
pidfile /var/run/redis.pid
port 27111
timeout 0
bind 127.0.0.1
loglevel verbose
logfile ''
databases 16
latency-monitor-threshold 1
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir ./tests/tmp/server.4464.1
slave-serve-stale-data yes
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
activerehashing yes
unixsocket /vagrant/redis-6.0.6/tests/tmp/server.4464.1/socket
ERROR:4506:C 28 Aug 2020 06:28:05.074 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
4506:C 28 Aug 2020 06:28:05.075 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=4506, just started
4506:C 28 Aug 2020 06:28:05.075 # Configuration loaded
4506:M 28 Aug 2020 06:28:05.076 * Increased maximum number of open files to 10032 (it was originally set to 1024).
4506:M 28 Aug 2020 06:28:05.126 # Opening Unix socket: bind: Operation not permitted
[12/56 done]: unit/printver (132 seconds)
Testing integration/replication-3
[13/56 done]: unit/type/zset (132 seconds)
Testing integration/replication-4
[err]: Can't start the Redis server
CONFIGURATION:always-show-logo yes
notify-keyspace-events KEA
daemonize no
pidfile /var/run/redis.pid
port 22611
timeout 0
bind 127.0.0.1
loglevel verbose
logfile ''
databases 16
latency-monitor-threshold 1
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir ./tests/tmp/server.4455.1
slave-serve-stale-data yes
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
activerehashing yes
unixsocket /vagrant/redis-6.0.6/tests/tmp/server.4455.1/socket
ERROR:4493:C 28 Aug 2020 06:28:05.061 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
4493:C 28 Aug 2020 06:28:05.062 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=4493, just started
4493:C 28 Aug 2020 06:28:05.063 # Configuration loaded
4493:M 28 Aug 2020 06:28:05.067 * Increased maximum number of open files to 10032 (it was originally set to 1024).
4493:M 28 Aug 2020 06:28:05.080 # Opening Unix socket: bind: Operation not permitted

最佳答案

安装pkg-config后,建议执行全新安装。

rm -rf redis-6.0.6
tar xvzf redis-6.0.6.tar.gz
cd redis-6.0.6/
make

关于redis - Redis失败了。 Ubuntu 18.04,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63611270/

相关文章:

ssh - 无法使用 Vagrant ssh Docker 提供的容器。 Vagrant ssh 也不起作用

redis - 无法连接到位于 127.0.0.1 的 Redis :0: Connection refused (when using init script to shut down a redis server w/unix socket)

ubuntu - Vagrant 中的 Redis(Ubuntu): how to forward redis port?

go - 如何将键数组传递给 go-redis 包中的 MGET func?

node.js - Node redis将数据传递给回调

virtualbox - 从 VM 到主机共享目录

node.js - 您可以在非 Web 服务器应用程序上使用 Node 调试吗?

ssl - redis 服务器 TLS 密码

redis-server - Redis 无法启动并出现错误 : redis-server. 服务:在步骤 NAMESPACE 生成/usr/bin/redis-server:失效文件句柄时失败

Redis logrotate配置