Error: Unable to load shared library #38

Closed
gabrielpreston opened this Issue Apr 16, 2012 · 9 comments

Comments

Projects
None yet
3 participants
@gabrielpreston

I'm running into the following problem when I try to use the module.

OS: Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel: Linux myserver 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
NPM: 1.1.16
Node: v0.6.15
GeoIP: 1.4.8

Code:

var geoip = require('geoip');

var edition = geoip.check('/home/project/GeoLiteCity.dat');

console.log(edition);

Error:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Unable to load shared library /home/project/node_modules/geoip/build/Release/geoip.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> (/home/project/node_modules/geoip/index.js:4:15)
    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
@kuno

This comment has been minimized.

Show comment
Hide comment
@kuno

kuno Apr 17, 2012

Owner

How do you install geoip, from npm registry or locally?
And can you check it out manually that If there is actually geoip.node binary file inside your /home/project/node_modules/geoip/build/Release folder?

Owner

kuno commented Apr 17, 2012

How do you install geoip, from npm registry or locally?
And can you check it out manually that If there is actually geoip.node binary file inside your /home/project/node_modules/geoip/build/Release folder?

@gabrielpreston

This comment has been minimized.

Show comment
Hide comment
@gabrielpreston

gabrielpreston Apr 17, 2012

I installed the geoip module using 'npm install geoip'. And the geoip.node file does exist:

./node_modules/geoip/build/Release/geoip.node: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

I installed the geoip module using 'npm install geoip'. And the geoip.node file does exist:

./node_modules/geoip/build/Release/geoip.node: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped
@kuno

This comment has been minimized.

Show comment
Hide comment
@kuno

kuno Apr 17, 2012

Owner

Maybe you should try install in a global wild:

sudo npm install geoip -g
Owner

kuno commented Apr 17, 2012

Maybe you should try install in a global wild:

sudo npm install geoip -g
@gabrielpreston

This comment has been minimized.

Show comment
Hide comment
@gabrielpreston

gabrielpreston Apr 17, 2012

Unfortunately I still run into the same problem:

Error: Unable to load shared library /usr/local/lib/node_modules/geoip/build/Release/geoip.node
/usr/local/lib/node_modules/geoip/build/Release/geoip.node: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

Unfortunately I still run into the same problem:

Error: Unable to load shared library /usr/local/lib/node_modules/geoip/build/Release/geoip.node
/usr/local/lib/node_modules/geoip/build/Release/geoip.node: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped
@kuno

This comment has been minimized.

Show comment
Hide comment
@kuno

kuno Apr 17, 2012

Owner

try set NODE_PATH environment variable:

export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules/
Owner

kuno commented Apr 17, 2012

try set NODE_PATH environment variable:

export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules/
@gabrielpreston

This comment has been minimized.

Show comment
Hide comment
@gabrielpreston

gabrielpreston Apr 17, 2012

Yeah, that is what I did in order to make use of the global geoip module since I uninstalled the local geoip module.

Yeah, that is what I did in order to make use of the global geoip module since I uninstalled the local geoip module.

@gorillamania

This comment has been minimized.

Show comment
Hide comment
@gorillamania

gorillamania Apr 22, 2012

Same exact problem on CentOS 6.2, geoip 0.4.5, node 0.6.15, GeoIP 1.4.7

Same exact problem on CentOS 6.2, geoip 0.4.5, node 0.6.15, GeoIP 1.4.7

@gorillamania

This comment has been minimized.

Show comment
Hide comment
@gorillamania

gorillamania Apr 22, 2012

RESOLVED:

On Centos and [apparently] RHEL, when compiling the MaxMind db from source as recommended on the README, it places the libraries in the wrong place. I resolved this error by installing GeoIP via yum:

sudo yum install GeoIP

RESOLVED:

On Centos and [apparently] RHEL, when compiling the MaxMind db from source as recommended on the README, it places the libraries in the wrong place. I resolved this error by installing GeoIP via yum:

sudo yum install GeoIP

@kuno

This comment has been minimized.

Show comment
Hide comment
@kuno

kuno Apr 22, 2012

Owner

@gorillamania:
glad to hear that.
I think install geoip from your package manager is the recommended way to do so.
Compiling from the source code will only be the backup choice.

Owner

kuno commented Apr 22, 2012

@gorillamania:
glad to hear that.
I think install geoip from your package manager is the recommended way to do so.
Compiling from the source code will only be the backup choice.

@kuno kuno closed this Mar 13, 2013

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