代码之家  ›  专栏  ›  技术社区  ›  Rahul

在ubuntu上安装node-js脉冲星客户端

  •  0
  • Rahul  · 技术社区  · 6 年前

    我正在尝试在ubuntu上安装用于node-js客户端的pulser客户端。我得到以下错误:

    fatal error: pulsar/c/message.h: No such file or directory  #include <pulsar/c/message.h>
    compilation terminated.
    Pulsar.target.mk:116: recipe for target 'Release/obj.target/Pulsar/src/addon.o' failed
    make: *** [Release/obj.target/Pulsar/src/addon.o] Error 1
    

    文件说

    Pulsar Node.js客户端库基于C++客户端库。 按照C++库的说明安装二进制文件 通过RPM、Deb或Homebrew包。

    (注意:您不仅需要安装脉冲星客户端库 还有脉冲星客户端开发库)

    然而,在Ubuntu上安装C++库的说明不是很清楚。还不清楚如何安装脉冲星客户端开发库。

    0 回复  |  直到 6 年前
        1
  •  2
  •   Ming L.    6 年前

    你说得对,必须安装C++库。注意:请确保安装了兼容的C++库。 https://github.com/apache/pulsar-client-node#compatibility

    要安装C++库ubuntu,这里有一个例子,它来自我们基于ubuntu构建的Docker镜像。 https://github.com/kafkaesque-io/pulsar-beam/blob/master/Dockerfile#L29

    wget --user-agent=Mozilla -O apache-pulsar-client.deb "https://archive.apache.org/dist/pulsar/pulsar-2.4.1/DEB/apache-pulsar-client.deb"
    wget --user-agent=Mozilla -O apache-pulsar-client-dev.deb "https://archive.apache.org/dist/pulsar/pulsar-2.4.1/DEB/apache-pulsar-client-dev.deb"
    
    apt install -y ./apache-pulsar-client.deb
    apt install -y ./apache-pulsar-client-dev.deb
    
    推荐文章