Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Building Redis from Source on Ubuntu Server 18.04

DZone's Guide to

Building Redis from Source on Ubuntu Server 18.04

Take a look at how you can install the Redis source and overcome the issue with installing it without the dependencies.

· Open Source Zone ·
Free Resource

New Report Reveals Open Source Risk Is Still a Mystery to Many. Read more.

After downloading the Redis source and attempting to install it on Ubuntu server 28.04, it looks like I've got some dependencies missing:

kev@ubuntu18-redis1:~/redis/redis-4.0.11$ make

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.

I found an identical post about this issue, of how to fix this without building the dependencies. To fix:

cd deps
make hiredis jemalloc linenoise lua geohash-int
cd ..
make
sudo make install

That resulted in a clean install, and I'm ready to start redis-server !

Software composition Analysis for DevSecOps. Start finding vulnerabilities in your open source components today.

Topics:
open source ,code snippet ,redis ,installation ,ubuntu

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}