Redis使失败。 Ubuntu 18.04
Redis make failing. Ubuntu 18.04
我正在尝试 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
在我的例子中,我没有在我的 Ubuntu 上安装 gcc,使用“sudo apt install gcc
”安装它为我修复了它。
安装 gcc,运行 命令“make distclean
” 然后 运行 “make
”
我在 WSL 中遇到了同样的问题,对我有用的是:
sudo apt-get install -y pkg-config
sudo apt-get update
sudo apt install gcc
sudo apt-get install tcl
sudo make distclean
sudo make
希望对您有所帮助。
我正在尝试 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
在我的例子中,我没有在我的 Ubuntu 上安装 gcc,使用“sudo apt install gcc
”安装它为我修复了它。
安装 gcc,运行 命令“make distclean
” 然后 运行 “make
”
我在 WSL 中遇到了同样的问题,对我有用的是:
sudo apt-get install -y pkg-config
sudo apt-get update
sudo apt install gcc
sudo apt-get install tcl
sudo make distclean
sudo make
希望对您有所帮助。