You are not logged in.

#1 2012-04-24 21:23:14

pedro_sland
Member
Registered: 2010-05-21
Posts: 15

[SOLVED] Unable to load shared library (node/mysql)

I am trying to use mysql-libmysqlclient with node. I can install it with npm. I try to use it and I get:

Error: Unable to load shared library /.../node_modules/mysql-libmysqlclient/build/Release/mysql_bindings.node
    at Object..node (module.js:472:11)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at Object.<anonymous> (/.../node_modules/mysql-libmysqlclient/mysql-libmysqlclient-bindings.js:12:20)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)

After doing some googling (I know that mysql client libraries are installed), I found a suggestion to use ldd to see if it could find the dependencies. It can't. Not because they aren't there but because:

ldd: warning: you do not have execution permission for `./mysql_bindings.node'
        not a dynamic executable

To me, this seems that it is creating a bad bin file.

I have another computer with arch and node and this module. It works great. I was able to use ldd with it and I whereis'ed the libraries on the bad machine. They are all there except linux-vdso.so.1 which isn't on either. I copied mysql_bindings.node from the working machine to the bad one. It didn't help and ldd still can't use the binary. I wondered if I had somehow ended up with a 32 bit Arch but uname -m says not.

I've spent quite some time on this and I can't see what is wrong. Any help would be much appreciated.

Last edited by pedro_sland (2012-04-24 21:35:05)

Offline

#2 2012-04-24 21:34:42

pedro_sland
Member
Registered: 2010-05-21
Posts: 15

Re: [SOLVED] Unable to load shared library (node/mysql)

I remembered that I had that partition set to noexec so I tried it elsewhere and it worked. Solved.

Offline

Board footer

Powered by FluxBB