Installing Redis 6 on Ubuntu 20.10

Ajeet Singh Raina - Jan 14 '22 - - Dev Community

Redis is an open source, in-memory, data structure store that can be used as a cache, primary database and message broker. It is a multi-model database that supports search, graph, real-time streaming, analytics and many other use cases beyond that of a simple data store. With over 52,000+ GitHub stars, 20,000+ forks and over 500+ contributors, Redis is quite popular among the developers. Redis gives developers building applications the tools and information they need in a very efficient manner. Redis today can be deployed on-premises, across clouds, hybrid environments as well as over the Edge devices flawlessly.

Installing Redis on Linux is super easy. The easiest way to install Redis from source follow the below process:

wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
Enter fullscreen mode Exit fullscreen mode

But if you try to install Redis Server on Ubuntu 20.10, you will face the below error message:

cd src && make all

make[1]: Entering directory '/home/kev/redis/redis-4.0.11/src'

    CC Makefile.dep

    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.
Enter fullscreen mode Exit fullscreen mode

To fix this issue, make sure that you follow the below steps:

cd deps
make hiredis jemalloc linenoise lua geohash-int
cd ..
make
sudo make install
Enter fullscreen mode Exit fullscreen mode

References:

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .