Closed farshadfahimi closed 7 months ago
I'm trying to install package from the source and got error
farshad@farshad-MS-ACB311:/var/www/fafait/adonis-api$ npm install node-libcurl --build-from-source --curl_static_build=true
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /var/www/fafait/adonis-api/node_modules/node-libcurl
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! make: Entering directory '/var/www/fafait/adonis-api/node_modules/node-libcurl/build'
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/node_libcurl.o
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/Easy.o
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/Share.o
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/Multi.o
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/Curl.o
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/CurlHttpPost.o
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/CurlVersionInfo.o
npm ERR! CXX(target) Release/obj.target/node_libcurl/src/Http2PushFrameHeaders.o
npm ERR! SOLINK_MODULE(target) Release/obj.target/node_libcurl.node
npm ERR! make: Leaving directory '/var/www/fafait/adonis-api/node_modules/node-libcurl/build'
npm ERR! Failed to execute '/home/farshad/.nvm/versions/node/v16.14.0/bin/node /home/farshad/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/fafait/adonis-api/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/var/www/fafait/adonis-api/node_modules/node-libcurl/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.5
npm ERR! node-pre-gyp info using node@16.14.0 | linux | x64
npm ERR! node-pre-gyp info build requesting source compile
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.0 | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/farshad/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/var/www/fafait/adonis-api/node_modules/node-libcurl/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/farshad/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/farshad/.cache/node-gyp/16.14.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/farshad/.cache/node-gyp/16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/farshad/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/farshad/.cache/node-gyp/16.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/var/www/fafait/adonis-api/node_modules/node-libcurl',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.0 | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../../nan/nan.h:58,
npm ERR! from ../src/Curl.h:13,
npm ERR! from ../src/node_libcurl.cc:7:
npm ERR! /home/farshad/.cache/node-gyp/16.14.0/include/node/node.h:842:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR! 842 | (node::addon_register_func) (regfunc), \
npm ERR! | ^
npm ERR! /home/farshad/.cache/node-gyp/16.14.0/include/node/node.h:876:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR! 876 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
npm ERR! | ^~~~~~~~~~~~~
npm ERR! ../src/node_libcurl.cc:68:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR! 68 | NODE_MODULE(node_libcurl, Init);
npm ERR! | ^~~~~~~~~~~
npm ERR! ../src/Easy.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE NodeLibcurl::Easy::GetInfo(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/Easy.cc:2103:58: warning: ‘v8::Local<v8::Context> v8::Object::CreationContext()’ is deprecated: Use MaybeLocal<Context> GetCreationContext() [-Wdeprecated-declarations]
npm ERR! 2103 | auto value = arr->Set(arr->CreationContext(), arr->Length(),
npm ERR! | ^
npm ERR! In file included from /home/farshad/.cache/node-gyp/16.14.0/include/node/node.h:63,
npm ERR! from ../../nan/nan.h:58,
npm ERR! from ../src/Curl.h:13,
npm ERR! from ../src/Multi.h:10,
npm ERR! from ../src/Easy.h:10,
npm ERR! from ../src/Easy.cc:7:
npm ERR! /home/farshad/.cache/node-gyp/16.14.0/include/node/v8.h:4316:18: note: declared here
npm ERR! 4316 | Local<Context> CreationContext();
npm ERR! | ^~~~~~~~~~~~~~~
npm ERR! ../src/Easy.cc:2137:56: warning: ‘v8::Local<v8::Context> v8::Object::CreationContext()’ is deprecated: Use MaybeLocal<Context> GetCreationContext() [-Wdeprecated-declarations]
npm ERR! 2137 | auto value = arr->Set(arr->CreationContext(), arr->Length(),
npm ERR! | ^
npm ERR! In file included from /home/farshad/.cache/node-gyp/16.14.0/include/node/node.h:63,
npm ERR! from ../../nan/nan.h:58,
npm ERR! from ../src/Curl.h:13,
npm ERR! from ../src/Multi.h:10,
npm ERR! from ../src/Easy.h:10,
npm ERR! from ../src/Easy.cc:7:
npm ERR! /home/farshad/.cache/node-gyp/16.14.0/include/node/v8.h:4316:18: note: declared here
npm ERR! 4316 | Local<Context> CreationContext();
npm ERR! | ^~~~~~~~~~~~~~~
npm ERR! ../src/CurlVersionInfo.cc:19:6: warning: ‘void NodeLibcurl::{anonymous}::SetObjPropertyToNullOrValue(v8::Local<v8::Object>, std::string, TValue) [with TValue = v8::Local<v8::Primitive>]’ defined but not used [-Wunused-function]
npm ERR! 19 | void SetObjPropertyToNullOrValue<v8::Local<v8::Primitive>>(v8::Local<v8::Object> obj,
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /usr/bin/ld: cannot find -lnghttp2
npm ERR! /usr/bin/ld: cannot find -lidn2
npm ERR! /usr/bin/ld: cannot find -lrtmp
npm ERR! /usr/bin/ld: cannot find -lssh
npm ERR! /usr/bin/ld: cannot find -lpsl
npm ERR! /usr/bin/ld: cannot find -llber
npm ERR! /usr/bin/ld: cannot find -lldap
npm ERR! /usr/bin/ld: cannot find -lbrotlidec
npm ERR! collect2: error: ld returned 1 exit status
npm ERR! make: *** [node_libcurl.target.mk:175: Release/obj.target/node_libcurl.node] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/home/farshad/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.4.0-99-generic
npm ERR! gyp ERR! command "/home/farshad/.nvm/versions/node/v16.14.0/bin/node" "/home/farshad/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/fafait/adonis-api/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/var/www/fafait/adonis-api/node_modules/node-libcurl/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /var/www/fafait/adonis-api/node_modules/node-libcurl
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/home/farshad/.nvm/versions/node/v16.14.0/bin/node /home/farshad/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/fafait/adonis-api/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/var/www/fafait/adonis-api/node_modules/node-libcurl/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/var/www/fafait/adonis-api/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Linux 5.4.0-99-generic
npm ERR! node-pre-gyp ERR! command "/home/farshad/.nvm/versions/node/v16.14.0/bin/node" "/var/www/fafait/adonis-api/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /var/www/fafait/adonis-api/node_modules/node-libcurl
npm ERR! node-pre-gyp ERR! node -v v16.14.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.5
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/farshad/.npm/_logs/2022-02-12T13_21_02_089Z-debug-0.log
Sorry, in an effort to keep maintaining this project, I am closing old tickets. If the issue persists with the latest version of node-libcurl, feel free to create a new ticket.
Describe the bug I'm trying to install
node-libcurl
on my existing api that create with adonisjs framework when deletenode_modules
andpackage-lock.json
file and try to execute thenpm i
command the installation process blocked when try to installnode-libcurl
at the last line system blocked and not go on
Version information:
package info: