mariano / node-db-mysql

MySQL database bindings for Node.js
http://nodejsdb.org
150 stars 30 forks source link

Error: undefined symbol: ev_default_loop_ptr #102

Open szagi3891 opened 11 years ago

szagi3891 commented 11 years ago

When you start getting an error:

grzegorz@debian:~/Pulpit/fiszki_node$ node test-db.js

module.js:356 Module._extensions[extension](this, filename); ^ Error: /home/grzegorz/node_modules/db-mysql/build/Release/mysql_bindings.node: undefined symbol: ev_default_loop_ptr at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/grzegorz/node_modules/db-mysql/db-mysql.js:18:15) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)

File content "test-db.js" :

var mysql = require('db-mysql'); console.log('test');

grzegorz@debian:~/Pulpit/fiszki_node$ node -v v0.10.0

System version (debian) grzegorz@debian:~/Pulpit/fiszki_node$ uname -a Linux debian 2.6.32-5-686 #1 SMP Mon Feb 25 01:04:36 UTC 2013 i686 GNU/Linux

ellisium commented 11 years ago

Same error on ubuntu and node.js 0.10.4

mscdex commented 11 years ago

This module hasn't been updated to use libuv. It is still using libev/libeio directly, which were deprecated in node v0.8.x and now removed in node v0.10.x.

ellisium commented 11 years ago

Downgrade to node 0.8 and it works. Module will be updated?

joycerw commented 11 years ago

I had the same error after upgrading to node v0.10 from v0.8. Resolved the error by doing the following:

  1. upgrade to node v0.10.
  2. Do an 'nvm update' to update all installed node modules
  3. At this point i was getting some 'module mismatch' errors. Had to do 'npm install' on some of my modules. I believe this reinstalls the modules and their dependendencies.
  4. To fix db-mysql module, i then followed the instructions from issue #98. Make sure you download the latest from the git repository. Doing 'npm install db-mysql' at this point will not pull the latest. After you download the latest source and make the change to package.json as described in #98, do an npm install from your LOCAL package that you just modified.
ellisium commented 11 years ago

THX @joycerw it works