question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CentOS 6.6 Node-gyp build error

See original GitHub issue

Hello everyone! My system is centOS 6.6 Nodejs: 6.10.3 gcc: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)

When i run npm install, it throws below exception. Please tell my how to fix it?

> bcrypt@0.8.7 install /u01/projects/GimoAnphaStation/MSamCard/node_modules/bcrypt
> node-gyp rebuild

make: Entering directory `/u01/projects/GimoAnphaStation/MSamCard/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:1:
../../nan/nan.h:43:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
In file included from /home/binh.vo/.node-gyp/6.10.3/include/node/node.h:42,
                 from ../../nan/nan.h:47,
                 from ../src/bcrypt_node.cc:1:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:345: error: expected unqualified-id before ‘using’
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In constructor ‘v8::MaybeLocal<T>::MaybeLocal()’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:362: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::IsEmpty() const’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:369: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:373: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo<T>::IsFirstPass() const’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:441: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: At global scope:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:481: error: expected unqualified-id before ‘using’
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:820: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:845: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:857: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: At global scope:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:882: error: expected unqualified-id before ‘using’
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:1119: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:1125: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In member function ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:3278: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: At global scope:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:4498: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:4514: error: ‘nullptr’ was not declared in this scope
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’:
/home/binh.vo/.node-gyp/6.10.3/include/node/v8.h:7538: error: ‘nullptr’ was not declared in this scope
In file included from ../../nan/nan.h:190,
                 from ../src/bcrypt_node.cc:1:
../../nan/nan_maybe_43_inl.h: At global scope:
../../nan/nan_maybe_43_inl.h:13: error: expected unqualified-id before ‘using’
../../nan/nan_maybe_43_inl.h:16: error: expected unqualified-id before ‘using’
../../nan/nan_maybe_43_inl.h:19: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:24: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:31: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:36: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:41: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:46: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:51: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:59: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:64: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:69: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:76: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:83: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:91: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:98: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:108: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:114: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:118: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:125: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:130: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:135: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:139: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:145: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:150: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:156: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:162: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:168: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:174: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:180: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:186: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:194: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:201: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:205: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:209: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:213: error: expected initializer before ‘<’ token
../../nan/nan_maybe_43_inl.h:217: error: expected initializer before ‘<’ token
../src/bcrypt_node.cc:353: error: expected ‘}’ at end of input
../../nan/nan_callbacks_12_inl.h:167: warning: ‘void Nan::imp::FunctionCallbackWrapper(const v8::FunctionCallbackInfo<v8::Value>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:181: warning: ‘void Nan::imp::GetterCallbackWrapper(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:197: warning: ‘void Nan::imp::SetterCallbackWrapper(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:253: warning: ‘void Nan::imp::PropertyGetterCallbackWrapper(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:270: warning: ‘void Nan::imp::PropertySetterCallbackWrapper(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:290: warning: ‘void Nan::imp::PropertyEnumeratorCallbackWrapper(const v8::PropertyCallbackInfo<v8::Array>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:306: warning: ‘void Nan::imp::PropertyDeleterCallbackWrapper(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Boolean>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:323: warning: ‘void Nan::imp::PropertyQueryCallbackWrapper(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Integer>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:428: warning: ‘void Nan::imp::IndexGetterCallbackWrapper(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:444: warning: ‘void Nan::imp::IndexSetterCallbackWrapper(uint32_t, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:464: warning: ‘void Nan::imp::IndexEnumeratorCallbackWrapper(const v8::PropertyCallbackInfo<v8::Array>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:480: warning: ‘void Nan::imp::IndexDeleterCallbackWrapper(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean>&)’ defined but not used
../../nan/nan_callbacks_12_inl.h:496: warning: ‘void Nan::imp::IndexQueryCallbackWrapper(uint32_t, const v8::PropertyCallbackInfo<v8::Integer>&)’ defined but not used
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory `/u01/projects/GimoAnphaStation/MSamCard/node_modules/bcrypt/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 2.6.32-573.22.1.el6.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /u01/projects/GimoAnphaStation/MSamCard/node_modules/bcrypt
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! Linux 2.6.32-573.22.1.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /u01/projects/GimoAnphaStation/MSamCard/npm-debug.log

[@refack edited formating]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
bnoordhuiscommented, May 17, 2017

That should work but with devtoolset it’s easier to scl enable devtoolset-2 bash and then run node-gyp from inside that bash shell.

1reaction
vothanhbinhltcommented, May 18, 2017

@bnoordhuis It’s very helpful. Thank you so much. It worked for me.

Thank you everyone.! Love u guys

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-gyp build error on centos - Stack Overflow
I am using Centos 6.6 installed on the server and trying to use node-gyp but I get a error when I am using...
Read more >
Fixing node-gyp make failed on centos in Docker | Tony Wolski
The error below occurs when executing RUN npm install sinopia in a Dockerfile FROM centos:6.6 (no doubt this isn't specific to Docker).
Read more >
Installing node-memwatch on CentOS 6, node-gyp rebuild ...
Try npm install memwatch-next. I think the old codebase is not updated to latest NPM/NodeJS. Dominic 895. Source: stackoverflow.com ...
Read more >
falling back to source compile with node-gyp - You.com
I am getting an error while trying to deploy friendly-pix web application using Firebase-CLI. Can anyone help me with this issue? node-pre-gyp ERR!...
Read more >
Meteor on CentOS VPS problems - help
Hi, I just purchased a CentOS 6.6 VPS and then installed meteor. ... meteor build locally to bundle your project into a node...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found