以前npm install mongojs
はラッパーを取得していましたが、アプリを実行しようとすると次のエラーが発生します。
node.js:195
throw e; // process.nextTick error, or 'error' event on first tick
^
Native bson parser not compiled, please compile or avoid using native_parser=true
次に、github からソースを取得し、node-mongodb-native を自分でコンパイルしようとしました。次に、make を実行すると、次のエラーが表示されます。
make -C ./external-libs/bson
make[1]: Entering directory`/tmp/node-mongodb-native/external-libs/bson`
rm -rf build.lock-wscript bson.node node-waf configure build
Checking for program g++ or c++: /usr/bin/g++
Checking for program cpp: /usr/bin/cpp
Checking for program ar: /usr/bin/ar
Checking for program ranlib: /usr/bin/ranlib
Checking for g++: ok
Checking for node path: not found
Checking for node prefix: ok
/usr/local 'configure' finished successfully (0.069s)
Waf: Entering directory `/tmp/node-mongodb-native/external-libs/bson/build'
[1/9] cxx: bson.cc -> build/default/bson_1.o
[2/9] cxx: long.cc -> build/default/long_1.o
[3/9] cxx: objectid.cc -> build/default/objectid_1.o
[4/9] cxx: binary.cc -> build/default/binary_1.o
[5/9] cxx: code.cc -> build/default/code_1.o
[6/9] cxx: dbref.cc -> build/default/dbref_1.o
../bson.cc:7:25: fatal error: node_events.h: No such file or directory
compilation terminated.
../objectid.cc:6:25: fatal error: node_events.h: No such file or directory
compilation terminated.
../code.cc:6:25: fatal error: node_events.h: No such file or directory
compilation terminated.
../dbref.cc:6:25: fatal error: node_events.h: No such file or directory
compilation terminated.
../long.cc:6:25: fatal error: node_events.h: No such file or directory
compilation terminated.
../binary.cc:7:25: fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/tmp/node-mongodb-native/external-libs/bson/build'
Build failed: -> task failed (err #1):
{task: cxx objectid.cc -> objectid_1.o} -> task failed (err#1):
{task: cxx bson.cc -> bson_1.o} -> task failed (err #1):
{task: cxx code.cc -> code_1.o} -> task failed (err #1):
{task: cxx dbref.cc -> dbref_1.o} -> task failed (err #1):
{task: cxx long.cc -> long_1.o} -> task failed (err #1):
{task: cxx binary.cc -> binary_1.o} make[1]: *** [all] Error 1
make[1]: Leaving directory `/tmp/node-mongodb-native/external-libs/bson'
make: *** [build_native] Error 2
これが失敗する理由と、それを機能させる方法についてのアイデアはありますか?