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

Redis [Snippet] PHP Redis compiling on centos 6.2 64bit

I have some error when try to compile PHP Redis on Centos 6.2 64bit. There is a little difference between ubuntu & centos php configuration. So, here’s the step to solve it

  1. download this file (nicolasff-phpredis-2.2.1-63-gf3dff08.zip)
  2. unzip nicolasff-phpredis-2.2.1-63-gf3dff08.zip
  3. cd nicolasff-phpredis-f3dff08
  4. yum install php-devel –enablerepo=remi
  5. phpize
  6. ./configure
  7. make && make install
  8. vim /etc/php.d/redis.ini
  9. extension=redis.so #insert to redis.ini file

Redis [Snippet] Redis compiling problem on centos 6.2 64bit

[root@wave3 redis-2.4.17]# make
cd src && make all
make[1]: Entering directory `/home/source/redis/redis-2.4.17/src’
MAKE hiredis
make[2]: Entering directory `/home/source/redis/redis-2.4.17/deps/hiredis’
gcc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
make[2]: gcc: Command not found
make[2]: *** [net.o] Error 127
make[2]: Leaving directory `/home/source/redis/redis-2.4.17/deps/hiredis’
make[1]: *** [dependencies] Error 2
make[1]: Leaving directory `/home/source/redis/redis-2.4.17/src’
make: *** [all] Error 2

I have that Error when try to compile Redis 2.4.17 on Centos 6.2 64bit, after some googling it’s solved. Here’s how to solved it.

yum install glibc-devel.x86_64
yum install glibc.i686
yum install gcc.x86_64