Node-sass: install fail in CentOS release 6.3 (Final)

Created on 25 Jan 2016  Â·  11Comments  Â·  Source: sass/node-sass

npm -v:

3.3.6

node -v:

v5.0.0

node -p process.versions:

{ http_parser: '2.5.0',
node: '5.0.0',
v8: '4.6.85.28',
uv: '1.7.5',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '56.1',
modules: '47',
openssl: '1.0.2d' }

node -p process.platform:

linux

node -p process.arch:

x64

npm.log

[email protected] install /home/work/ci/apollo/node_modules/node-sass
node scripts/install.js

------- https://github.com/sass/node-sass/releases/download/v3.4.2/linux-x64-47_binding.node
Binary downloaded and installed at /home/work/ci/apollo/node_modules/node-sass/vendor/linux-x64-47/binding.node

[email protected] postinstall /home/work/ci/apollo/node_modules/node-sass
node scripts/build.js

------- https://github.com/sass/node-sass/releases/download/v3.4.2/linux-x64-47_binding.node
/home/work/ci/apollo/node_modules/node-sass/vendor/linux-x64-47/binding.node exists.
testing binary.
Problem with the binary.
Manual build incoming.
Building: /home/work/.nvm/versions/node/v5.0.0/bin/node /home/work/ci/apollo/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
make: Entering directory /home/work/ci/apollo/node_modules/node-sass/build' make: Leaving directory/home/work/ci/apollo/node_modules/node-sass/build'
~

npm.error

gyp info it worked if it ends with ok
gyp verb cli [ '/home/work/.nvm/versions/node/v5.0.0/bin/node',
gyp verb cli '/home/work/ci/apollo/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /home/work/.jumbo/bin/python2
gyp verb check python version /home/work/.jumbo/bin/python2 -c "import platform; print(platform.python_version());" returned: "2.7.3\n"
gyp verb get node dir no --target version specified, falling back to host node version: 5.0.0
gyp verb command install [ '5.0.0' ]
gyp verb install input version string "5.0.0"
gyp verb install installing version: 5.0.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 5.0.0
gyp verb build dir attempting to create "build" dir: /home/work/ci/apollo/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /home/work/ci/apollo/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /home/work/ci/apollo/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /home/work/ci/apollo/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /home/work/ci/apollo/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /home/work/.jumbo/bin/python2
gyp info spawn args [ '/home/work/ci/apollo/node_modules/node-sass/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/work/ci/apollo/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/work/ci/apollo/node_modules/node-sass/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/work/.node-gyp/5.0.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/work/.node-gyp/5.0.0',
gyp info spawn args '-Dnode_gyp_dir=/home/work/ci/apollo/node_modules/node-sass/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/work/ci/apollo/node_modules/node-sass',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/work/.node-gyp/5.0.0
gyp verb which succeeded for make /home/work/.jumbo/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: *** No rule to make target Release/obj.target/libsass/src/libsass/src/ast.o', needed byRelease/obj.target/src/sass.a'. Stop.
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/work/ci/apollo/node_modules/node-sass/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32_1-17-0-0
gyp ERR! command "/home/work/.nvm/versions/node/v5.0.0/bin/node" "/home/work/ci/apollo/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/work/ci/apollo/node_modules/node-sass
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
Build failed

npm ERR! Linux 2.6.32_1-17-0-0
npm ERR! argv "/home/work/.nvm/versions/node/v5.0.0/bin/node" "/home/work/.nvm/versions/node/v5.0.0/bin/npm" "i"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node scripts/build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/work/ci/apollo/node_modules/node-sass/npm-debug.log

OS - Linux npm build

Most helpful comment

Checkout your current gcc version, it should be greater than 4.6.x.
image
https://github.com/sass/libsass

All 11 comments

The same error,it troubles me a lot.

Got the same with :

gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/web/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.2.40
gyp ERR! command "/Node.js/usr/bin/node" "/web/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /web/node_modules/node-sass
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok

I'm also getting an error on CentOS6.6, node 0.12.9, where it says:

Problem with the binary.
Manual build incoming.

Then gyp fails:

g++ '-DNODE_GYP_MODULE_NAME=libsass' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.3.2"' -I/root/.node-gyp/0.12.9/include/node -I/root/.node-gyp/0.12.9/src -I/root/.node-gyp/0.12.9/deps/uv/include -I/root/.node-gyp/0.12.9/deps/v8/include -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -ffunction-sections -fdata-sections -fno-tree-vrp -fno-tree-sink -fno-omit-frame-pointer -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw   -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
In file included from ../src/libsass/src/ast.cpp:1:
../src/libsass/src/ast.hpp: In constructor ‘Sass::Hashed::Hashed(size_t)’:
../src/libsass/src/ast.hpp:246: error: ‘class std::unordered_map<Sass::Expression*, Sass::Expression*, std::hash<Sass::Expression*>, std::equal_to<Sass::Expression*>, std::allocator<std::pair<Sass::Expression* const, Sass::Expression*> > >’ has no member named ‘reserve’
../src/libsass/src/ast.hpp: In member function ‘Sass::Hashed& Sass::Hashed::operator+=(Sass::Hashed*)’:
../src/libsass/src/ast.hpp:275: error: expected initializer before ‘:’ token
../src/libsass/src/ast.hpp:279: error: could not convert ‘Sass::Hashed::reset_duplicate_key()’ to ‘bool’
../src/libsass/src/ast.hpp:280: error: expected primary-expression before ‘return’
../src/libsass/src/ast.hpp:280: error: expected ‘)’ before ‘return’
../src/libsass/src/ast.hpp: In member function ‘virtual size_t Sass::Map::hash()’:
../src/libsass/src/ast.hpp:872: error: expected initializer before ‘:’ token
../src/libsass/src/ast.hpp:876: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:876: error: expected ‘;’ before ‘}’ token
../src/libsass/src/ast.hpp:876: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:876: error: expected ‘)’ before ‘}’ token
../src/libsass/src/ast.hpp:876: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:876: error: expected ‘;’ before ‘}’ token
../src/libsass/src/ast.hpp: In member function ‘virtual size_t Sass::Function_Call::hash()’:
../src/libsass/src/ast.hpp:1109: error: expected initializer before ‘:’ token
../src/libsass/src/ast.hpp:1111: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1111: error: expected ‘;’ before ‘}’ token
../src/libsass/src/ast.hpp:1111: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1111: error: expected ‘)’ before ‘}’ token
../src/libsass/src/ast.hpp:1111: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1111: error: expected ‘;’ before ‘}’ token
../src/libsass/src/ast.hpp: In member function ‘virtual size_t Sass::Number::hash()’:
../src/libsass/src/ast.hpp:1236: error: expected initializer before ‘:’ token
../src/libsass/src/ast.hpp:1238: error: expected primary-expression before ‘for’
../src/libsass/src/ast.hpp:1238: error: expected ‘;’ before ‘for’
../src/libsass/src/ast.hpp:1238: error: expected primary-expression before ‘for’
../src/libsass/src/ast.hpp:1238: error: expected ‘)’ before ‘for’
../src/libsass/src/ast.hpp:1238: error: expected initializer before ‘:’ token
../src/libsass/src/ast.hpp:1240: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1240: error: expected ‘;’ before ‘}’ token
../src/libsass/src/ast.hpp:1240: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1240: error: expected ‘)’ before ‘}’ token
../src/libsass/src/ast.hpp:1240: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1240: error: expected ‘;’ before ‘}’ token
../src/libsass/src/ast.hpp: In member function ‘virtual size_t Sass::String_Schema::hash()’:
../src/libsass/src/ast.hpp:1380: error: expected initializer before ‘:’ token
../src/libsass/src/ast.hpp:1382: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1382: error: expected ‘;’ before ‘}’ token
../src/libsass/src/ast.hpp:1382: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1382: error: expected ‘)’ before ‘}’ token
../src/libsass/src/ast.hpp:1382: error: expected primary-expression before ‘}’ token
../src/libsass/src/ast.hpp:1382: error: expected ‘;’ before ‘}’ token
../src/libsass/src/ast.cpp: In member function ‘virtual bool Sass::Compound_Selector::is_superselector_of(Sass::Selector_List*, std::string)’:
../src/libsass/src/ast.cpp:520: error: expected initializer before ‘:’ token
../src/libsass/src/ast.cpp:523: error: expected primary-expression before ‘return’
../src/libsass/src/ast.cpp:523: error: expected ‘;’ before ‘return’
../src/libsass/src/ast.cpp:523: error: expected primary-expression before ‘return’
../src/libsass/src/ast.cpp:523: error: expected ‘)’ before ‘return’
../src/libsass/src/ast.cpp: In member function ‘void Sass::Selector_List::populate_extends(Sass::Selector_List*, Sass::Context&, Sass::ExtensionSubsetMap&)’:
../src/libsass/src/ast.cpp:1294: error: expected initializer before ‘:’ token
../src/libsass/src/ast.cpp:2133: error: expected primary-expression at end of input
../src/libsass/src/ast.cpp:2133: error: expected ‘;’ at end of input
../src/libsass/src/ast.cpp:2133: error: expected primary-expression at end of input
../src/libsass/src/ast.cpp:2133: error: expected ‘)’ at end of input
../src/libsass/src/ast.cpp:2133: error: expected statement at end of input
../src/libsass/src/ast.cpp:1293: warning: unused variable ‘extender’
../src/libsass/src/ast.cpp:2133: error: expected ‘}’ at end of input
../src/libsass/src/ast.cpp: At global scope:
../src/libsass/src/ast.cpp:2133: error: expected ‘}’ at end of input
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 1

Looks like it's having trouble building libsass, but what causes the "Problem with the binary" message?

For some context. We compile our linux bindings on CentOS 5 because it has a very old cpp compiler which has caused us a lot of support trouble.

It could be that has changed in CentOS 6.3 that makes this binary incompatible. This is the cause of the Problem with the binary message.

@marquetd in future please do not cut off console output because you will always cut off the actual important information. This goes for any project. Too much information is better than not enough. Please provide the full output in a github gist.

@incaronbus your issue appears to be unrelated. Please open a new issue following all steps in the troubleshooting guide

Can you provide the output of

ldd /home/work/ci/apollo/node_modules/node-sass/vendor/linux-x64-47/binding.node

and

ldd /home/work/.nvm/versions/node/v5.0.0/bin/node

Can you also try not to use nvm? You may end up using a different node version than expected.

I have been troubled by this a lot also,so how this can be solved? @xzyfer

But how to solve this?

This happened to me using homestead in windows over and over

I solve it by doing npm rebuild node-sass --no-bin-links after npm install

The same problem in CentOS 6.5. When could you solve this issue?

Solving this is not our roadmap. Unfortunately, as far as we're aware, it is not possible to support both CentOS 5 and 6.

Checkout your current gcc version, it should be greater than 4.6.x.
image
https://github.com/sass/libsass

Was this page helpful?
0 / 5 - 0 ratings