npmlibxml-js

npm install fails with node-gyp errors for libxmljs


I'm trying to run a node project that uses libxmljs, but it fails on installing it, with

npm "ld: symbol(s) not found for architecture x86_64"

I've tried different versions of npm, but none of helped, all have the same problem it appears.

How can I fix this?


Solution

  • For this project, I managed to fix it by simply using a newer version of libxml in my package.json

    I bumped it up to v0.18 from v0.11

    "dependencies":{
        "libxmljs": "^0.18.0"
    }
    

    then running npm install again. I don't know if it matters or not, but I also removed my ~/.node-gyp folder as well. Note that this solution was suggested by a comment on a similar github issue