Install fails on Ubuntu 12.04
danpickford opened this issue · 3 comments
danpickford commented
Hi i've been trying to install most of the day but none of the fixes / work around mentioned seem to work. Please could you help?
../node-expat.cc:492:21: error: ‘Handle’ was not declared in this scope
../node-expat.cc:492:34: error: expected primary-expression before ‘>’ token
../node-expat.cc:492:36: error: ‘target’ was not declared in this scope
../node-expat.cc:497:3: error: ‘init’ was not declared in this scope
make: *** [Release/obj.target/node_expat/node-expat.o] Error 1
make: Leaving directory `/home/vagrant/evo/scripts/partners/sky/scraping/node_modules/xml2js-expat/node_modules/node-expat/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/vagrant/.nvm/versions/node/v4.2.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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 3.2.0-123-virtual
gyp ERR! command "/home/vagrant/.nvm/versions/node/v4.2.2/bin/node" "/home/vagrant/.nvm/versions/node/v4.2.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/evo/scripts/partners/sky/scraping/node_modules/xml2js-expat/node_modules/node-expat
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 3.2.0-123-virtual
npm ERR! argv "/home/vagrant/.nvm/versions/node/v4.2.2/bin/node" "/home/vagrant/.nvm/versions/node/v4.2.2/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
danpickford commented
I should mention that g++ and build-essential are both installed. I also get the same error running node 6.9.1.
gfguthrie commented
Was getting this but then I installed/updated build-essential & it started working: https://help.ubuntu.com/community/CompilingEasyHowTo
Let me know if that helps you too.
snacky6 commented
I had the same issue and I solved it by installing gcc5 and g++5. Take a look a this comment : node-inspector/node-inspector#776 (comment)
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --config gcc (choose gcc-5 from the list)