Redis [Snippet] Redis compiling problem on ubuntu 10.04 32bit

cd hiredis && make static
make[3]: Entering directory `/home/project/redis/redis-2.6.4/deps/hiredis’
gcc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
make[3]: gcc: Command not found
make[3]: *** [net.o] Error 127
make[3]: Leaving directory `/home/project/redis/redis-2.6.4/deps/hiredis’
make[2]: *** [hiredis] Error 2
make[2]: Leaving directory `/home/project/redis/redis-2.6.4/deps’
make[1]: [persist-settings] Error 2 (ignored)
CC adlist.o
/bin/sh: cc: not found
make[1]: *** [adlist.o] Error 127
make[1]: Leaving directory `/home/project/redis/redis-2.6.4/src’
make: *** [all] Error 2

That’s mean no gcc installed, so just type this command, apt-get install gcc

And then when I tried to make again, I’m encounter this problem.

root@vx-ubu:/home/project/redis/redis-2.6.4# make
cd src && make all
make[1]: Entering directory `/home/project/redis/redis-2.6.4/src’
CC adlist.o
In file included from adlist.c:34:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error “Newer version of jemalloc required
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/home/project/redis/redis-2.6.4/src’
make: *** [all] Error 2

All You have to do is type this command make distclean. And now, redis-2.6.4 is ready to use.

Advertisements

2 thoughts on “Redis [Snippet] Redis compiling problem on ubuntu 10.04 32bit

  1. Thanks for sharing it. I had the same problem in CentOS 6.2. It worked.

  2. Thanks.

    When making Redis Server 2.8.19 in Red Hat Linux 6.5 (Santiago) unix machine, Getting the same “Newer version of jemalloc required” error.

    When I run “make distclean” in Red Hat Linux 6.5 (Santiago) unix machine, Not sure the make command worked or not. Below is the command execution:-
    ********************************************************************************************
    [usr@dev-machine-1 redis-2.8.19]$ make distclean
    cd src && make distclean
    sh: ./mkreleasehdr.sh: /bin/sh^M: bad interpreter: No such file or directory
    make[1]: Entering directory `/home/usr/redis-2.8.19/src’
    rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html
    (cd ../deps && make distclean)
    make[2]: Entering directory `/home/usr/redis-2.8.19/deps’
    (cd hiredis && make clean) > /dev/null || true
    (cd linenoise && make clean) > /dev/null || true
    (cd lua && make clean) > /dev/null || true
    (cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
    (rm -f .make-*)
    make[2]: Leaving directory `/home/usr/redis-2.8.19/deps’
    (rm -f .make-*)
    make[1]: Leaving directory `/home/usr/redis-2.8.19/src’
    [usr@dev-machine-1 redis-2.8.19]$

    ********************************************************************************************
    Not sure the redis-server got built successfully because of “./mkreleasehdr.sh no such file”
    What files normally be generated/updated when running make command on redis ?

    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s