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

Fatal error: expat.h: No such file or directory #2

Closed
asavin opened this Issue Feb 13, 2014 · 11 comments

Comments

Projects
None yet
8 participants
@asavin

asavin commented Feb 13, 2014

Getting following error when installing bucket-list npm package:

> node-expat@1.6.1 install /vagrant/node_modules/bucket-list/node_modules/xml-object-stream/node_modules/node-expat
> node-gyp rebuild

make: Entering directory `/vagrant/node_modules/bucket-list/node_modules/xml-object-stream/node_modules/node-expat/build'
make: Warning: File `node_expat.target.mk' has modification time 9.8e+02 s in the future
  CXX(target) Release/obj.target/node_expat/node-expat.o
../node-expat.cc:6:19: fatal error: expat.h: No such file or directory
 #include <expat.h>
                   ^
compilation terminated.
make: *** [Release/obj.target/node_expat/node-expat.o] Error 1
make: Leaving directory `/vagrant/node_modules/bucket-list/node_modules/xml-object-stream/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 (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.11.0-15-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /vagrant/node_modules/bucket-list/node_modules/xml-object-stream/node_modules/node-expat
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm http 304 http://registry.npmjs.org/mime-magic
npm http 304 http://registry.npmjs.org/xml2js
npm ERR! node-expat@1.6.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-expat@1.6.1 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-gyp rebuild
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! System Linux 3.11.0-15-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "bucket-list"
npm ERR! cwd /vagrant
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm http 304 http://registry.npmjs.org/libxml-to-js
npm http GET http://registry.npmjs.org/sax
npm http GET http://registry.npmjs.org/xmlbuilder
npm http GET http://registry.npmjs.org/libxmljs
npm http 304 http://registry.npmjs.org/xmlbuilder
npm http 304 http://registry.npmjs.org/sax
npm http 304 http://registry.npmjs.org/libxmljs
@scottcorgan

This comment has been minimized.

Show comment
Hide comment
@scottcorgan

scottcorgan Feb 26, 2014

Owner

@asavin are you still getting this error?

Owner

scottcorgan commented Feb 26, 2014

@asavin are you still getting this error?

@elsbree

This comment has been minimized.

Show comment
Hide comment
@elsbree

elsbree Mar 28, 2014

I'm seeing this error as well when trying to install on an Ubuntu server.

elsbree commented Mar 28, 2014

I'm seeing this error as well when trying to install on an Ubuntu server.

@scottcorgan

This comment has been minimized.

Show comment
Hide comment
@scottcorgan

scottcorgan Mar 28, 2014

Owner

Investigating
On Mar 28, 2014 1:53 PM, "elsbree" notifications@github.com wrote:

I'm seeing this error as well when trying to install on an Ubuntu server.


Reply to this email directly or view it on GitHubhttps://github.com/scottcorgan/bucket-list/issues/2#issuecomment-38966796
.

Owner

scottcorgan commented Mar 28, 2014

Investigating
On Mar 28, 2014 1:53 PM, "elsbree" notifications@github.com wrote:

I'm seeing this error as well when trying to install on an Ubuntu server.


Reply to this email directly or view it on GitHubhttps://github.com/scottcorgan/bucket-list/issues/2#issuecomment-38966796
.

@elsbree

This comment has been minimized.

Show comment
Hide comment
@elsbree

elsbree Apr 14, 2014

This was resolved by installing the libexpat1-dev package. (sudo apt-get install libexpat1-dev on Ubuntu). Sorry, not your fault. Though maybe a warning message would be useful if this library isn't already present.

elsbree commented Apr 14, 2014

This was resolved by installing the libexpat1-dev package. (sudo apt-get install libexpat1-dev on Ubuntu). Sorry, not your fault. Though maybe a warning message would be useful if this library isn't already present.

@scottcorgan

This comment has been minimized.

Show comment
Hide comment
@scottcorgan

scottcorgan Apr 14, 2014

Owner

Thanks @elsbree. @asavin does that solve your issue?

Owner

scottcorgan commented Apr 14, 2014

Thanks @elsbree. @asavin does that solve your issue?

@asavin

This comment has been minimized.

Show comment
Hide comment
@asavin

asavin Apr 14, 2014

Sorry guys, I'm unable to verify this at the moment. Feel free to close the issue!

asavin commented Apr 14, 2014

Sorry guys, I'm unable to verify this at the moment. Feel free to close the issue!

@AY-WQ-DEV

This comment has been minimized.

Show comment
Hide comment
@AY-WQ-DEV

AY-WQ-DEV Oct 23, 2014

installing of libexpat1-dev helps
Thanks @elsbree

AY-WQ-DEV commented Oct 23, 2014

installing of libexpat1-dev helps
Thanks @elsbree

@DiegoRBaquero

This comment has been minimized.

Show comment
Hide comment
@DiegoRBaquero

DiegoRBaquero Oct 24, 2015

Same here. Thank you!

DiegoRBaquero commented Oct 24, 2015

Same here. Thank you!

@s8sg

This comment has been minimized.

Show comment
Hide comment
@s8sg

s8sg Sep 4, 2017

Thanks.
yum install expat-devel in Centos

s8sg commented Sep 4, 2017

Thanks.
yum install expat-devel in Centos

@SumWum

This comment has been minimized.

Show comment
Hide comment
@SumWum

SumWum Nov 15, 2017

Yeah that worked for this specific issue..

SumWum commented Nov 15, 2017

Yeah that worked for this specific issue..

@keyhole425

This comment has been minimized.

Show comment
Hide comment
@keyhole425

keyhole425 Nov 20, 2017

Had this problem on an issue relating to installing Perl's XML::Simple or XML::Parser libraries on a Debian 9 Stretch image. CPAN was complaining about XML::Simple install not having expat.h.

This was resolved by using:
sudo apt-get install libexpat1-dev

Strangely enough, the non-dev option didn't work:
sudo apt-get install libexpat1

Posting for others who might have the issue, and also as a thanks to @elsbree

keyhole425 commented Nov 20, 2017

Had this problem on an issue relating to installing Perl's XML::Simple or XML::Parser libraries on a Debian 9 Stretch image. CPAN was complaining about XML::Simple install not having expat.h.

This was resolved by using:
sudo apt-get install libexpat1-dev

Strangely enough, the non-dev option didn't work:
sudo apt-get install libexpat1

Posting for others who might have the issue, and also as a thanks to @elsbree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment