Redis installation from source
To compile and install Redis from the source try to follow the steps:
Downloading the source files:
wget https://download.redis.io/redis-stable.tar.gz
Compiling Redis:
To compile Redis run:
tar -xzvf redis-stable.tar.gz
cd redis-stable
make
Problems:
make[1]: Entering directory '/home/ubuntu/redis-stable/src'
CC adlist.o
/bin/sh: 1: cc: not found
make[1]: *** [Makefile:403: adlist.o] Error 127
make[1]: Leaving directory '/home/ubuntu/redis-stable/src'
make: *** [Makefile:6: all] Error 2
make[1]: Entering directory '/home/ubuntu/redis-stable/src'
CC adlist.o
In file included from adlist.c:34:
zmalloc.h:50:10: fatal error: jemalloc/jemalloc.h: No such file or directory
50 | #include <jemalloc/jemalloc.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:403: adlist.o] Error 1
make[1]: Leaving directory '/home/ubuntu/redis-stable/src'
make: *** [Makefile:6: all] Error 2
Solution:
cd deps
make hiredis jemalloc linenoise lua geohash-int
cd ..
make install
cd src && make install
make[1]: Entering directory '/home/ubuntu/redis-stable/src'
CC adlist.o
CC quicklist.o
CC ae.o
CC anet.o
CC dict.o
CC server.o
CC sds.o
CC zmalloc.o
CC lzf_c.o
...
Starting Redis
To start Redis run:
redis-server
My site is free of ads and trackers. Was this post helpful to you? Why not
Disqus is great for comments/feedback but I had no idea it came with these gaudy ads.