在ubuntu上安装Node js pulsar客户端

问题描述 投票:1回答:1

我正在尝试在ubuntu上为node js客户端安装pulsar-client。我收到以下错误:

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软件包。

(注意:您不仅需要安装pulsar-client库,还需要安装也是pulsar-client-dev库)

但是,在Ubuntu上安装C ++库的说明不是很清楚。还不清楚如何安装pulsar-client-dev库。

c++ node.js ubuntu-16.04 apache-pulsar
1个回答
1
投票

您正确,必须安装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
© www.soinside.com 2019 - 2024. All rights reserved.