npm install node-expat error . help !

1,004 views
Skip to first unread message

FranklinSun

unread,
Jan 31, 2012, 5:18:32 AM1/31/12
to nodejs
npm http GET https://registry.npmjs.org/node-expat
npm http 200 https://registry.npmjs.org/node-expat
npm http GET https://registry.npmjs.org/node-expat/-/node-expat-1.4.4.tgz
npm http 200 https://registry.npmjs.org/node-expat/-/node-expat-1.4.4.tgz

> node-...@1.4.4 install /Users/franklin/nodePros/nodeblog/node_modules/node-expat
> node-waf configure build

Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /usr/local/lib/node
Checking for node prefix : ok /usr/local
Checking for header expat.h : not installed
/Users/franklin/nodePros/nodeblog/node_modules/node-expat/wscript:13:
error: the configuration failed (see '/Users/franklin/nodePros/
nodeblog/node_modules/node-expat/build/config.log')
npm ERR! error installing node-...@1.4.4
npm ERR! node-...@1.4.4 install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the node-...@1.4.4 install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 11.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "node-expat"
npm ERR! cwd /Users/franklin/nodePros/nodeblog
npm ERR! node -v v0.7.2-pre
npm ERR! npm -v 1.1.0-beta-7
npm ERR! code ELIFECYCLE
npm ERR! message node-...@1.4.4 install: `node-waf configure build`
npm ERR! message `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/franklin/nodePros/nodeblog/npm-debug.log
npm not ok


reason: Checking for header expat.h : not installed
google says missing libexpat1-dev,
In mac os x, how to install libexpat1-dev?

Ryan Schmidt

unread,
Jan 31, 2012, 3:23:03 PM1/31/12
to nod...@googlegroups.com

On Jan 31, 2012, at 04:18, FranklinSun wrote:

> In mac os x, how to install libexpat1-dev?

If you want to install it manually, it's here:

http://expat.sourceforge.net/

If you want to install it using MacPorts, run:

sudo port install expat

Other methods might include using Fink or Homebrew.


FranklinSun

unread,
Feb 1, 2012, 12:42:45 PM2/1/12
to nodejs
Thks, I did, but still throw error: Checking for header expat.h : not
installed

Ryan Schmidt

unread,
Feb 2, 2012, 1:54:12 PM2/2/12
to nod...@googlegroups.com

On Feb 1, 2012, at 11:42, FranklinSun wrote:

> Thks, I did,

What did you do, exactly?

And how is npm installed?

Perhaps you need to inform npm where you have installed expat. (Usual environment variables to do that would be CPPFLAGS and LDFLAGS.)

Reply all
Reply to author
Forward
0 new messages