pkwenda
V2EX  ›  Redis

mac 编译 redis 问题请教

  •  
  •   pkwenda ·
    pkwenda · Mar 2, 2021 · 2171 views
    This topic created in 1899 days ago, the information mentioned may be changed or developed.

    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 编译了一下不要太顺利

    Supplement 1  ·  Mar 2, 2021

    搞定了

    问题的原因应该是,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 replies    2021-03-02 14:30:41 +08:00
    oxromantic
        1
    oxromantic  
       Mar 2, 2021
    REDIS_SERVER_NAME 环境变量未定义?
    pkwenda
        2
    pkwenda  
    OP
       Mar 2, 2021
    @oxromantic #1 还需要设置环境变量吗? 没见有人讲啊 :> 有什么可以参考的吗,我见国内外的小伙伴都是 make 一下基本就完事了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5789 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 06:29 · PVG 14:29 · LAX 23:29 · JFK 02:29
    ♥ Do have faith in what you're doing.