我正在尝试使用 cygwin 在 Windows 上安装 redis-2.6.16。我遇到了以下错误。
感谢任何帮助。谢谢。
/c/cygwin64/bin/cc: /c/cygwin64/bin/cc: cannot execute binary file
make[3]: *** [net.o] Error 126
make[3]: Leaving directory `/c/cygwin64/home/redis-2.6.16/deps/hiredis'
make[2]: *** [hiredis] Error 2
make[2]: Leaving directory `/c/cygwin64/home/redis-2.6.16/deps'
make[1]: [persist-settings] Error 2 (ignored)
CC adlist.o
/c/cygwin64/bin/cc: /c/cygwin64/bin/cc: cannot execute binary file
make[1]: *** [adlist.o] Error 126
make[1]: Leaving directory `/c/cygwin64/home/redis-2.6.16/src'
make: *** [all] Error 2
最佳答案
您不能在 Windows 上使用基本的 Redis,您必须使用 Windows 上不受支持的端口提供的二进制文件:https://github.com/MSOpenTech/redis
基本上,您不能只在Windows 上编译Redis 的C 代码。而且这个端口有一些缺点(因为Windows不支持fork命令),里面有“stop the world”操作(redis在其正式版本中没有):你不能将它用于生产。
就是说,堆栈显示缺少 cc,您需要在 cygwin 上使用 C 编译器,但这不足以让 Redis 在 Windows 上运行。如果确实需要使 Redis 在 Windows 上运行,请检查最后一个链接 (github) 并下载二进制文件。
关于Redis-2.6.16安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20130106/