无法在Windows机器上制作redis

时间:2017-05-15 19:10:07

标签: node.js redis cygwin

我正在尝试在redis项目中使用nodejs。我看到要构建redis,您需要make命令和gcc。我已在我的Windows计算机上安装了cygwin,然后同时安装了makegcc

我从这里https://redis.io/download下载redis并按照说明

$ 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 

我正在尝试做同样的事情,但在构建此问题时面临一些问题。以下是日志: -

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

任何人都可以帮我解决可能出现的问题吗?

2 个答案:

答案 0 :(得分:1)

此处是新的redis 5版本,其中包含有关如何执行操作的信息 https://github.com/meiry/redis5_compiled_for_windows10

答案 1 :(得分:0)

由于@FluffyNights建议Exception in thread "main" java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at launchApp.LaunchApp1.main(LaunchApp1.java:27) 不支持Windows。我使用https://github.com/MSOpenTech/redis

在工作模式下完成了它

从此处下载版本https://github.com/MSOpenTech/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.zip,然后提取此压缩文件。

您会在那里找到redis,只需执行它即可启动redis-server.exe服务器。这也有redis客户端,你可以使用它来执行命令来保存,获取等等