0

I follow the instructions on installing SQLite for Node.js:

apt-get install sqlite3
apt-get install libsqlite3-dev
npm install sqlite3

Still, the code

var db = new require('sqlite3').verbose().Database('database.db');

results in the error message:

./node: symbol lookup error: /root/together2/node_modules/sqlite3/lib/sqlite3_bindings.node: undefined symbol: _ZN2v814ObjectTemplate11SetAccessorENS_6HandleINS_6StringEEEPFNS1_INS_5ValueEEENS_5LocalIS2_EERKNS_12AccessorInfoEEPFvS7_NS6_IS4_EESA_ES5_NS_13AccessControlENS_17PropertyAttributeE

The system is:

cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"

Can anyone explain what am I missing here?

2
  • 1
    That error appears to me that you are attempting to use the sqlite3 package with a different build of node.js than it was built for, hence the missing symbol. You should rebuild the package against the version of node.js that you are requiring it from. Commented Feb 17, 2013 at 20:32
  • I reinstalled node and sqlite3 and now it works. I’m not sure but it may have been that npm was installed from the package manager while node from source. Thank you, I would accept your comment if it would be an answer. Commented Feb 23, 2013 at 14:44

1 Answer 1

1

That error appears to me that you are attempting to use the sqlite3 package with a different build of node.js than it was built for, hence the missing symbol. You should rebuild the package against the version of node.js that you are requiring it from.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.