Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on Linux Mint #132

Open
OlivierRicca opened this issue Mar 5, 2021 · 1 comment
Open

Unable to install on Linux Mint #132

OlivierRicca opened this issue Mar 5, 2021 · 1 comment

Comments

@OlivierRicca
Copy link

OlivierRicca commented Mar 5, 2021

Hello,
I try to install the package via npm install bluetooth-hci-socket or sudo npm install bluetooth-hci-socket, but I always get the same error (does not have permission to access the dev dir "/root/.cache/node-gyp/15.5.1").

I have tried to log as root and install with -g but it's the same.
I have already install the bluetooth stuff : sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

  • Node Version: v15.5.1 (npm 7.6.0)
  • Platform: Linux Mint 20.1
  • node-gyp: 7.1.2
  • Compiler: gcc version 9.3.0
Verbose output :

136 info run [email protected] install { code: 1, signal: null }
137 timing reify:rollback:createSparse Completed in 82ms
138 timing reify:rollback:retireShallow Completed in 0ms
139 timing command:install Completed in 1569ms
140 verbose stack Error: command failed
140 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
140 verbose stack     at ChildProcess.emit (node:events:376:20)
140 verbose stack     at maybeClose (node:internal/child_process:1063:16)
140 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
141 verbose pkgid [email protected]
142 verbose cwd /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan
143 verbose Linux 5.4.0-66-generic
144 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
145 verbose node v15.5.1
146 verbose npm  v7.6.0
147 error code 1
148 error path /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket
149 error command failed
150 error command sh -c node-gyp rebuild
151 error make : on entre dans le répertoire « /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket/build »
151 error   CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
151 error make : on quitte le répertoire « /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket/build »
152 error gyp info it worked if it ends with ok
152 error gyp info using [email protected]
152 error gyp info using [email protected] | linux | x64
152 error gyp info find Python using Python version 3.8.5 found at "/usr/bin/python3"
152 error gyp WARN EACCES current user ("olivier") does not have permission to access the dev dir "/root/.cache/node-gyp/15.5.1"
152 error gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
152 error gyp info spawn /usr/bin/python3
152 error gyp info spawn args [
152 error gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
152 error gyp info spawn args   'binding.gyp',
152 error gyp info spawn args   '-f',
152 error gyp info spawn args   'make',
152 error gyp info spawn args   '-I',
152 error gyp info spawn args   '/home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket/build/config.gypi',
152 error gyp info spawn args   '-I',
152 error gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
152 error gyp info spawn args   '-I',
152 error gyp info spawn args   '/tmp/.node-gyp/15.5.1/include/node/common.gypi',
152 error gyp info spawn args   '-Dlibrary=shared_library',
152 error gyp info spawn args   '-Dvisibility=default',
152 error gyp info spawn args   '-Dnode_root_dir=/tmp/.node-gyp/15.5.1',
152 error gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
152 error gyp info spawn args   '-Dnode_lib_file=/tmp/.node-gyp/15.5.1/<(target_arch)/node.lib',
152 error gyp info spawn args   '-Dmodule_root_dir=/home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket',
152 error gyp info spawn args   '-Dnode_engine=v8',
152 error gyp info spawn args   '--depth=.',
152 error gyp info spawn args   '--no-parallel',
152 error gyp info spawn args   '--generator-output',
152 error gyp info spawn args   'build',
152 error gyp info spawn args   '-Goutput_dir=.'
152 error gyp info spawn args ]
152 error gyp info spawn make
152 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
152 error ../src/BluetoothHciSocket.cpp: In static member function ‘static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
152 error ../src/BluetoothHciSocket.cpp:128:82: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
152 error   128 |   target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
152 error       |                                                                                  ^
152 error In file included from /tmp/.node-gyp/15.5.1/include/node/node.h:63,
152 error                  from /tmp/.node-gyp/15.5.1/include/node/node_buffer.h:25,
152 error                  from ../src/BluetoothHciSocket.cpp:7:
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:6497:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
152 error  6497 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
152 error       |                                              ^~~~~~~~~~~
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:6497:46: note:   candidate expects 1 argument, 0 provided
152 error ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
152 error ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
152 error   251 |     Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
152 error       |                                                                                               ^
152 error In file included from ../src/BluetoothHciSocket.cpp:8:
152 error ../../nan/nan.h:1047:46: note: declared here
152 error  1047 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
152 error       |                                              ^~~~~~~~~~~~
152 error ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
152 error   251 |     Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
152 error       |                                                                                               ^
152 error In file included from ../src/BluetoothHciSocket.cpp:8:
152 error ../../nan/nan.h:1047:46: note: declared here
152 error  1047 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
152 error       |                                              ^~~~~~~~~~~~
152 error ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
152 error ../src/BluetoothHciSocket.cpp:269:109: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
152 error   269 |   Local<Function> errorConstructor = Local<Function>::Cast(globalObj->Get(Nan::New("Error").ToLocalChecked()));
152 error       |                                                                                                             ^
152 error In file included from /tmp/.node-gyp/15.5.1/include/node/node.h:63,
152 error                  from /tmp/.node-gyp/15.5.1/include/node/node_buffer.h:25,
152 error                  from ../src/BluetoothHciSocket.cpp:7:
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:3763:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
152 error  3763 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
152 error       |                                           ^~~
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:3763:43: note:   candidate expects 2 arguments, 1 provided
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:3766:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
152 error  3766 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
152 error       |                                           ^~~
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:3766:43: note:   candidate expects 2 arguments, 1 provided
152 error ../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
152 error   275 |   Local<Value> error = errorConstructor->NewInstance(1, constructorArgs);
152 error       |                                                                        ^
152 error In file included from /tmp/.node-gyp/15.5.1/include/node/node.h:63,
152 error                  from /tmp/.node-gyp/15.5.1/include/node/node_buffer.h:25,
152 error                  from ../src/BluetoothHciSocket.cpp:7:
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:4497:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’
152 error  4497 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
152 error       |                                            ^~~~~~~~~~~
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:4497:44: note:   candidate expects 3 arguments, 2 provided
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:4500:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’
152 error  4500 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
152 error       |                                            ^~~~~~~~~~~
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:4500:44: note:   candidate expects 1 argument, 2 provided
152 error ../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
152 error   282 |   Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
152 error       |                                                                                             ^
152 error In file included from ../src/BluetoothHciSocket.cpp:8:
152 error ../../nan/nan.h:1047:46: note: declared here
152 error  1047 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
152 error       |                                              ^~~~~~~~~~~~
152 error ../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
152 error   282 |   Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
152 error       |                                                                                             ^
152 error In file included from ../src/BluetoothHciSocket.cpp:8:
152 error ../../nan/nan.h:1047:46: note: declared here
152 error  1047 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
152 error       |                                              ^~~~~~~~~~~~
152 error ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
152 error ../src/BluetoothHciSocket.cpp:395:34: error: no matching function for call to ‘v8::Value::IntegerValue()’
152 error   395 |       devId = arg0->IntegerValue();
152 error       |                                  ^
152 error In file included from /tmp/.node-gyp/15.5.1/include/node/node.h:63,
152 error                  from /tmp/.node-gyp/15.5.1/include/node/node_buffer.h:25,
152 error                  from ../src/BluetoothHciSocket.cpp:7:
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:2909:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
152 error  2909 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
152 error       |                                        ^~~~~~~~~~~~
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:2909:40: note:   candidate expects 1 argument, 0 provided
152 error ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
152 error ../src/BluetoothHciSocket.cpp:417:34: error: no matching function for call to ‘v8::Value::IntegerValue()’
152 error   417 |       devId = arg0->IntegerValue();
152 error       |                                  ^
152 error In file included from /tmp/.node-gyp/15.5.1/include/node/node.h:63,
152 error                  from /tmp/.node-gyp/15.5.1/include/node/node_buffer.h:25,
152 error                  from ../src/BluetoothHciSocket.cpp:7:
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:2909:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
152 error  2909 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
152 error       |                                        ^~~~~~~~~~~~
152 error /tmp/.node-gyp/15.5.1/include/node/v8.h:2909:40: note:   candidate expects 1 argument, 0 provided
152 error In file included from /tmp/.node-gyp/15.5.1/include/node/node_buffer.h:25,
152 error                  from ../src/BluetoothHciSocket.cpp:7:
152 error ../src/BluetoothHciSocket.cpp: At global scope:
152 error /tmp/.node-gyp/15.5.1/include/node/node.h:838: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]
152 error   838 |       (node::addon_register_func) (regfunc),                          \
152 error       |                                           ^
152 error /tmp/.node-gyp/15.5.1/include/node/node.h:872:3: note: in expansion of macro ‘NODE_MODULE_X’
152 error   872 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
152 error       |   ^~~~~~~~~~~~~
152 error ../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro ‘NODE_MODULE’
152 error   499 | NODE_MODULE(binding, BluetoothHciSocket::Init);
152 error       | ^~~~~~~~~~~
152 error make: *** [binding.target.mk:111 : Release/obj.target/binding/src/BluetoothHciSocket.o] Erreur 1
152 error gyp ERR! build error
152 error gyp ERR! stack Error: `make` failed with exit code: 2
152 error gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
152 error gyp ERR! stack     at ChildProcess.emit (node:events:376:20)
152 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:284:12)
152 error gyp ERR! System Linux 5.4.0-66-generic
152 error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
152 error gyp ERR! cwd /home/olivier/Documents/TRAAK/3_PROJETS/DeepTime/test1_scan/node_modules/bluetooth-hci-socket
152 error gyp ERR! node -v v15.5.1
152 error gyp ERR! node-gyp -v v7.1.2
152 error gyp ERR! not ok
153 verbose exit 1

Thanks in advance for any support,

Olivier

@rzr
Copy link

rzr commented Oct 1, 2021

May you forward your ticket to downstream version if relevant or confirm @abandonware version match your requirements here:

#123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants