I am trying to use redis
in my nodejs
project. I see that to build redis
you need make
command and gcc
. I have instaled cygwin
on my windows machine and then installed both make
and gcc
.
I downloaded redis
from here https://redis.io/download and as per the instructions -
$ wget http://download.redis.io/releases/redis-3.2.8.tar.gz
$ tar xzf redis-3.2.8.tar.gz
$ cd redis-3.2.8
$ make
I am trying to do same, but facing some issues while building this. Here are the logs :-
D:\Node.JS\redis-3.2.8>make
cd src && make all
make[1]: Entering directory '/cygdrive/d/Node.JS/redis-3.2.8/src'
CC adlist.o
CC quicklist.o
CC ae.o
In file included from ae.c:58:0:
ae_select.c: In function 'aeApiResize':
ae_select.c:52:37: warning: unused parameter 'eventLoop' [-Wunused-parameter]
static int aeApiResize(aeEventLoop *eventLoop, int setsize) {
^~~~~~~~~
CC anet.o
CC dict.o
CC server.o
CC sds.o
CC zmalloc.o
zmalloc.c: In function 'zmalloc_get_memory_size':
zmalloc.c:421:1: warning: control reaches end of non-void function [-Wreturn-typ
e]
}
^
CC lzf_c.o
CC lzf_d.o
CC pqsort.o
CC zipmap.o
CC sha1.o
CC ziplist.o
CC release.o
CC networking.o
CC util.o
CC object.o
CC db.o
CC replication.o
CC rdb.o
CC t_string.o
CC t_list.o
CC t_set.o
CC t_zset.o
CC t_hash.o
CC config.o
CC aof.o
CC pubsub.o
CC multi.o
CC debug.o
debug.c: In function 'watchdogSignalHandler':
debug.c:1138:60: warning: unused parameter 'secret' [-Wunused-parameter]
void watchdogSignalHandler(int sig, siginfo_t *info, void *secret) {
^~~~~~
CC sort.o
CC intset.o
CC syncio.o
CC cluster.o
CC crc16.o
CC endianconv.o
CC slowlog.o
CC scripting.o
CC bio.o
CC rio.o
CC rand.o
CC memtest.o
CC crc64.o
CC bitops.o
CC sentinel.o
CC notify.o
CC setproctitle.o
CC blocked.o
CC hyperloglog.o
CC latency.o
CC sparkline.o
CC redis-check-rdb.o
CC geo.o
LINK redis-server
cc: error: ../deps/hiredis/libhiredis.a: No such file or directory
cc: error: ../deps/lua/src/liblua.a: No such file or directory
cc: error: ../deps/geohash-int/geohash.o: No such file or directory
cc: error: ../deps/geohash-int/geohash_helper.o: No such file or directory
make[1]: *** [Makefile:185: redis-server] Error 1
make[1]: Leaving directory '/cygdrive/d/Node.JS/redis-3.2.8/src'
make: *** [Makefile:6: all] Error 2
D:\Node.JS\redis-3.2.8>m
Can anyone help me what could be the issue ?
As @FluffyNights suggested that redis
does not support windows. I made it in working mode using https://github.com/MSOpenTech/redis
Download releases from here https://github.com/MSOpenTech/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.zip then extract this compressed file.
You will find redis-server.exe
there, just execute it to start redis
server. This has redis
client also which you can use to execute its commands to save, get etc