svenpaulsen / node-ts3sdk-client

TeamSpeak 3 SDK Client Addon for Node.js
30 stars 3 forks source link

libts3client.so not found #2

Closed antoine-pous closed 7 years ago

antoine-pous commented 7 years ago

Hi !

I'm trying to start the client example to see how all these stuffs work and i've this error.

node-ts3sdk-client$ node examples/client_minimal.js 
module.js:598
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: libts3client.so: cannot open shared object file: No such file or directory
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (node-ts3sdk-client/examples/client_minimal.js:13:17)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)

If you have any idea on how to fix it this issue it's awesome !

Thank you !

svenpaulsen commented 7 years ago

The module needs this shared library (libts3client.so) as it's basically a wrapper for the TeamSpeak 3 SDK. You can use ldd to verify this.

ldd /path/to/module/ts3client.node

You can modify the LD_LIBRARY_PATH to make sure your app will find the TeamSpeak ClientLib.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/sdk/
antoine-pous commented 7 years ago

If fact the file node-ts3sdk-client/bin/linux/amd64/libts3client.so exists into your wrapper, this is why i don't understand the error.

svenpaulsen commented 7 years ago

Correct. But depending on the platform you're running on, the OS will search for shared libraries in different locations... As I said, on Linux, the LD_LIBRARY_PATH is what's important.

svenpaulsen commented 7 years ago

Were you able to resolve the problem? Can I close this issue?

antoine-pous commented 7 years ago

Sorry, i haven't tested the solution.

I've asked about this error because i want write somes unit tests with mocha and chai for this repository before implementing it into another project :)