Open zymap opened 3 years ago
From your log, it looks like pulsar-client-cpp is not installed. Please try again after installing pulsar-client-cpp.
Also, please tell us the system configuration (OS, client version).
We should have a CI to run the tests with the latest pulsar code to check the compatibility./
We will consider having it.
I am facing the same. I installed pulsar cpp client in ubuntu following the instructions on https://pulsar.apache.org/docs/en/client-libraries-cpp/, using the deb package, it has also created libpulsar and libpulsar.so in my /usr/lib folder. But i don't know where these files should be found - '<pulsar/c/message.h>'
let me confirm, have you installed apache-pulsar-client-dev.deb
?
I have the same problem. Unable to install from linux docker. How can I solve this ?
I got the same error whether I installed apache-pulsar-client-dev.deb or not.
@jskorlol Installation instructions for rpm or debian have been added at https://github.com/apache/pulsar-client-node/pull/213. Please see https://github.com/apache/pulsar-client-node#install-on-linux and try again.
I
I have the same problem. Unable to install from linux docker. How can I solve this ?
I got the same error whether I installed apache-pulsar-client-dev.deb or not.
I have the same problem too , but my environment : docker image : node:16.15.1 (debian) platform : linux/arm64
my Dockerfile
FROM node:16.15.1
WORKDIR /srv
ADD . .
RUN apt update && apt install -y zip wget curl gnupg g++ make
ARG PULSAR_CPP_CLIENT_VERSION=2.9.1
RUN wget --no-check-certificate --user-agent=Mozilla -O apache-pulsar-client-dev.deb "https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client.deb" && \
wget --no-check-certificate --user-agent=Mozilla -O apache-pulsar-client.deb "https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client-dev.deb" && \
dpkg --force-architecture -i apache-pulsar-client*.deb
RUN npm install --save pulsar-client
RUN npm install
CMD [ "node", "index.js" ]
error message
#11 15.28 npm notice
#11 15.28 npm ERR! code 1
#11 15.28 npm ERR! path /srv/node_modules/pulsar-client
#11 15.28 npm ERR! command failed
#11 15.28 npm ERR! command sh -c node-pre-gyp install --fallback-to-build
#11 15.28 npm ERR! make: Entering directory '/srv/node_modules/pulsar-client/build'
#11 15.28 npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
#11 15.28 npm ERR! AR(target) Release/obj.target/../node-addon-api/nothing.a
#11 15.28 npm ERR! COPY Release/nothing.a
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/addon.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/Message.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/MessageId.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/Authentication.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/Client.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/Producer.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/ProducerConfig.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/Consumer.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/ConsumerConfig.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/Reader.o
#11 15.28 npm ERR! CXX(target) Release/obj.target/Pulsar/src/ReaderConfig.o
#11 15.28 npm ERR! SOLINK_MODULE(target) Release/obj.target/Pulsar.node
#11 15.28 npm ERR! make: Leaving directory '/srv/node_modules/pulsar-client/build'
#11 15.28 npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/srv/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/srv/node_modules/pulsar-client/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
#11 15.28 npm ERR! node-pre-gyp info it worked if it ends with ok
#11 15.28 npm ERR! node-pre-gyp info using node-pre-gyp@1.0.9
#11 15.28 npm ERR! node-pre-gyp info using node@16.15.1 | linux | arm64
#11 15.28 npm ERR! node-pre-gyp info check checked for "/srv/node_modules/pulsar-client/build/Release/libpulsar.node" (not found)
#11 15.28 npm ERR! node-pre-gyp http GET https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.6.2-node-v93-linux-arm64.tar.gz
#11 15.28 npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.6.2-node-v93-linux-arm64.tar.gz
#11 15.28 npm ERR! node-pre-gyp WARN Pre-built binaries not installable for pulsar-client@1.6.2 and node@16.15.1 (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
#11 15.28 npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.6.2-node-v93-linux-arm64.tar.gz
#11 15.28 npm ERR! gyp info it worked if it ends with ok
#11 15.28 npm ERR! gyp info using node-gyp@9.0.0
#11 15.28 npm ERR! gyp info using node@16.15.1 | linux | arm64
#11 15.28 npm ERR! gyp info ok
#11 15.28 npm ERR! gyp info it worked if it ends with ok
#11 15.28 npm ERR! gyp info using node-gyp@9.0.0
#11 15.28 npm ERR! gyp info using node@16.15.1 | linux | arm64
#11 15.28 npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
#11 15.28 npm ERR! gyp http GET https://nodejs.org/download/release/v16.15.1/node-v16.15.1-headers.tar.gz
#11 15.28 npm ERR! gyp http 200 https://nodejs.org/download/release/v16.15.1/node-v16.15.1-headers.tar.gz
#11 15.28 npm ERR! gyp http GET https://nodejs.org/download/release/v16.15.1/SHASUMS256.txt
#11 15.28 npm ERR! gyp http 200 https://nodejs.org/download/release/v16.15.1/SHASUMS256.txt
#11 15.28 npm ERR! gyp info spawn /usr/bin/python3
#11 15.28 npm ERR! gyp info spawn args [
#11 15.28 npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
#11 15.28 npm ERR! gyp info spawn args 'binding.gyp',
#11 15.28 npm ERR! gyp info spawn args '-f',
#11 15.28 npm ERR! gyp info spawn args 'make',
#11 15.28 npm ERR! gyp info spawn args '-I',
#11 15.28 npm ERR! gyp info spawn args '/srv/node_modules/pulsar-client/build/config.gypi',
#11 15.28 npm ERR! gyp info spawn args '-I',
#11 15.28 npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
#11 15.28 npm ERR! gyp info spawn args '-I',
#11 15.28 npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.15.1/include/node/common.gypi',
#11 15.28 npm ERR! gyp info spawn args '-Dlibrary=shared_library',
#11 15.28 npm ERR! gyp info spawn args '-Dvisibility=default',
#11 15.28 npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.15.1',
#11 15.28 npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
#11 15.28 npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.15.1/<(target_arch)/node.lib',
#11 15.28 npm ERR! gyp info spawn args '-Dmodule_root_dir=/srv/node_modules/pulsar-client',
#11 15.28 npm ERR! gyp info spawn args '-Dnode_engine=v8',
#11 15.28 npm ERR! gyp info spawn args '--depth=.',
#11 15.28 npm ERR! gyp info spawn args '--no-parallel',
#11 15.28 npm ERR! gyp info spawn args '--generator-output',
#11 15.28 npm ERR! gyp info spawn args 'build',
#11 15.28 npm ERR! gyp info spawn args '-Goutput_dir=.'
#11 15.28 npm ERR! gyp info spawn args ]
#11 15.28 npm ERR! gyp info ok
#11 15.28 npm ERR! gyp info it worked if it ends with ok
#11 15.28 npm ERR! gyp info using node-gyp@9.0.0
#11 15.28 npm ERR! gyp info using node@16.15.1 | linux | arm64
#11 15.28 npm ERR! gyp info spawn make
#11 15.28 npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
#11 15.28 npm ERR! /usr/bin/ld: skipping incompatible /usr/lib/gcc/aarch64-linux-gnu/8/../../../../lib/libpulsar.so when searching for -lpulsar
#11 15.28 npm ERR! /usr/bin/ld: skipping incompatible /usr/lib/gcc/aarch64-linux-gnu/8/../../../../lib/libpulsar.a when searching for -lpulsar
#11 15.28 npm ERR! /usr/bin/ld: skipping incompatible /usr/lib/../lib/libpulsar.so when searching for -lpulsar
#11 15.28 npm ERR! /usr/bin/ld: skipping incompatible /usr/lib/../lib/libpulsar.a when searching for -lpulsar
#11 15.28 npm ERR! /usr/bin/ld: skipping incompatible /usr/lib/gcc/aarch64-linux-gnu/8/../../../libpulsar.so when searching for -lpulsar
#11 15.28 npm ERR! /usr/bin/ld: skipping incompatible /usr/lib/gcc/aarch64-linux-gnu/8/../../../libpulsar.a when searching for -lpulsar
#11 15.28 npm ERR! /usr/bin/ld: skipping incompatible //usr/lib/libpulsar.so when searching for -lpulsar
#11 15.28 npm ERR! /usr/bin/ld: skipping incompatible //usr/lib/libpulsar.a when searching for -lpulsar
#11 15.28 npm ERR! /usr/bin/ld: cannot find -lpulsar
#11 15.28 npm ERR! collect2: error: ld returned 1 exit status
#11 15.28 npm ERR! make: *** [Pulsar.target.mk:153: Release/obj.target/Pulsar.node] Error 1
#11 15.28 npm ERR! gyp ERR! build error
#11 15.28 npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
#11 15.28 npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
#11 15.28 npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
#11 15.28 npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
#11 15.28 npm ERR! gyp ERR! System Linux 5.10.104-linuxkit
#11 15.28 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/srv/node_modules/pulsar-client/build/Release/libpulsar.node" "--module_name=libpulsar" "--module_path=/srv/node_modules/pulsar-client/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
#11 15.28 npm ERR! gyp ERR! cwd /srv/node_modules/pulsar-client
#11 15.28 npm ERR! gyp ERR! node -v v16.15.1
#11 15.28 npm ERR! gyp ERR! node-gyp -v v9.0.0
#11 15.28 npm ERR! gyp ERR! not ok
#11 15.28 npm ERR! node-pre-gyp ERR! build error
#11 15.28 npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/srv/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/srv/node_modules/pulsar-client/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
#11 15.28 npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/srv/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
#11 15.28 npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
#11 15.28 npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
#11 15.28 npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
#11 15.28 npm ERR! node-pre-gyp ERR! System Linux 5.10.104-linuxkit
#11 15.28 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/srv/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#11 15.28 npm ERR! node-pre-gyp ERR! cwd /srv/node_modules/pulsar-client
#11 15.28 npm ERR! node-pre-gyp ERR! node -v v16.15.1
#11 15.28 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
#11 15.28 npm ERR! node-pre-gyp ERR! not ok
#11 15.29
#11 15.29 npm ERR! A complete log of this run can be found in:
#11 15.29 npm ERR! /root/.npm/_logs/2022-06-23T08_48_06_306Z-debug-0.log
------
executor failed running [/bin/sh -c npm install pulsar-client]: exit code: 1
but at linux/amd64 is ok
reference: https://github.com/alexyans/docker-node-pulsar-client/blob/master/14-alpine/Dockerfile
Motivation
Install the pulsar-client-node with latest pulsar-client-cpp failed. error logs:
We should have a CI to run the tests with the latest pulsar code to check the compatibility./