简体   繁体   中英

Install node-expat on ubuntu or centos

I'm trying to install node-expat . I've tried everything suggested that I could find. I don't get any build errors while running npm install node-expat . I've put in all the dependencies & building kits, tried npm cache clean & tried it on both CentOS (Amazon Linux) and Ubuntu 12.10 but the error remains the same:

module.js:485
  process.dlopen(filename, module.exports);
          ^
Error: Module version mismatch, refusing to load.
    at Object.Module._extensions..node (module.js:485:11)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/ubuntu/cc/node_modules/node-expat/lib/node-expat.js:4:13)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

How can I get it to run without hitches?

The reason I want node-expat is for node-xmpp

This may or may not help you, but I was getting the same error with an appjs app I'm working on, and I just figured out what was causing it for me. I have node v0.10.x installed on my machine, but I was building the modules to include them in an appjs app (which currently comes packaged with v0.8.x of node.exe. So I was building the module with 0.10, but trying to run it on 0.8.

I uninstalled my node 0.10, installed 0.8, rebuilt/installed the offending module into my appjs app, and the error went away. So make sure you're building the module with the same version of node you're trying to run it on!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM