在 ubuntu 上安装 node js pulsar 客户端
Installing node js pulsar client on ubuntu
我正在尝试在 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 client library is based on the C++ client library.
Follow the instructions for C++ library for installing the binaries
through RPM, Deb or Homebrew packages.
(Note: you will need to install not only the pulsar-client library but
also the pulsar-client-dev library)
不过Ubuntu上关于安装C++库的说明不是很清楚。也不清楚如何安装 pulsar-client-dev 库。
您说得对,必须安装 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
我正在尝试在 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 client library is based on the C++ client library. Follow the instructions for C++ library for installing the binaries through RPM, Deb or Homebrew packages.
(Note: you will need to install not only the pulsar-client library but also the pulsar-client-dev library)
不过Ubuntu上关于安装C++库的说明不是很清楚。也不清楚如何安装 pulsar-client-dev 库。
您说得对,必须安装 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