V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
pkwenda
V2EX  ›  Redis

mac 编译 redis 问题请教

  •  
  •   pkwenda ·
    pkwenda · 2021-03-02 12:20:30 +08:00 · 1523 次点击
    这是一个创建于 1122 天前的主题,其中的信息可能已经有所发展或是发生改变。

    macos 平台 https://redis.io/ 下载了个最新稳定版 6.2.0 打算 debug 阅读一下 redis 源码,make 的时候总是报错如下,没有 google 到谁有类似的错误,请大神指教:

    
    Venda-GM@zhuangwendadeiMac redis-6.2.0 % sudo make install
    
    make ℹ info Invoking install target
    make ℹ info Invoking all target
    (node:72871) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): undefined
    (node:72871) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    make ✖ ERR  not found: make-$(REDIS_SERVER_NAME)
    sh: $: command not found
    make ✖ ERR  cd src && $(MAKE) $@
    make ✖ ERR  Recipe exited with code %d
    (node:72868) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Recipe exited with code %d
    (node:72868) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    
    
    
    

    gcc tcl 都正常

    NodeJS 用的 13 换了 8.2,虽然我不知道为什么 make 报错是 nodeJs 的错误。

    随便去了个 centOs 编译了一下不要太顺利

    第 1 条附言  ·  2021-03-02 15:50:16 +08:00

    搞定了

    问题的原因应该是,make 被污染了,make 被占用了,怀疑是 node 占的,我就纳闷怎么能报错 node 相关的异步错误呢,我用 brew 重新下载,用了个别名,gmake,就可以了

    image.png

    gmake是GNU Make的缩写。 Linux系统环境下的make就是GNU Make,之所以有gmake,是因为在别的平台上,make一般被占用,GNU make只好叫gmake了。 比如在安装二进制文件进行编译时要使用make命令,但如果在Solaris或其他非GNU系统中运行,必须使用GNU make,而不是使用系统自带的make版本,这时要用gmake代替make进行编译。

    
    brew reinstall make
    
    
    2 条回复    2021-03-02 14:30:41 +08:00
    oxromantic
        1
    oxromantic  
       2021-03-02 13:55:13 +08:00
    REDIS_SERVER_NAME 环境变量未定义?
    pkwenda
        2
    pkwenda  
    OP
       2021-03-02 14:30:41 +08:00
    @oxromantic #1 还需要设置环境变量吗? 没见有人讲啊 :> 有什么可以参考的吗,我见国内外的小伙伴都是 make 一下基本就完事了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1228 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:22 · PVG 07:22 · LAX 16:22 · JFK 19:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.