Failed to load c++ bson extension
Closed this issue · 10 comments
Installed mongo-dump-stream using npm and it installed without an error. However when I want to use the cli, I get the following error:
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
Usage: mongo-dump-stream mongodb://username:password@host:port/dbname
Is there an npm dependency missing?
I cannot find the build folder either:
# ls -l /usr/local/lib/node_modules/mongo-dump-stream/
total 60
drwxr-xr-x 2 nobody root 4096 Jul 27 10:55 bin
-rw-r--r-- 1 nobody root 9751 Jul 7 14:32 index.js
-rw-r--r-- 1 nobody root 1060 Mar 1 02:50 LICENSE
drwxr-xr-x 2 nobody root 4096 Jul 27 10:50 logos
-rw-r--r-- 1 nobody root 649 Mar 1 14:57 mongo-dump-stream.js
-rw-r--r-- 1 nobody root 606 Feb 28 20:17 mongo-load-stream.js
drwxr-xr-x 9 nobody root 4096 Jul 27 10:50 node_modules
-rw-r--r-- 1 nobody root 9515 Jul 27 10:50 package.json
-rw-r--r-- 1 nobody root 7951 Jul 7 14:28 README.md
drwxr-xr-x 2 nobody root 4096 Jul 27 10:50 tests
Any idea?
Nothing is missing and the tool will work. You don't have a working compiler environment, so the mongodb driver is falling back to its slightly slower pure javascript version and warning you about it. Nothing to do with mongo-dump-stream itself.
OK please add install instructions please, if there are additional requirements to meet?
I used
npm install -g mongo-dump-stream
as descibed in README.
The compiler tools and programs were installed as a requirement of "npm" package.
This issue is with the mongodb package, but I take your point since this is
a command line tool and people might not have any node experience.
You need to install xcode and the xcode command line tools (if this is a
Mac, that is).
On Mon, Jul 27, 2015 at 7:26 AM, Claudio Kuenzler notifications@github.com
wrote:
OK please add install instructions please, if there are additional
requirements to meet?I used
npm install -g mongo-dump-stream
as descibed in README.
The compiler tools and programs were installed as a requirement of "npm"
package.—
Reply to this email directly or view it on GitHub
#7 (comment)
.
*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE | (215) 755-1330 | punkave.com
Thanks for your answer. So do I get this right, that it only works on Mac OS X? I am trying to run it on Ubuntu 14.04 LTS but xcode only appears to exist for Mac OS X.
What you need is a working C/C++ compiler environment, for whatever your
platform is.
On Mon, Jul 27, 2015 at 7:37 AM, Claudio Kuenzler notifications@github.com
wrote:
Thanks for your answer. So do I get this right, that it only works on Mac
OS X? I am trying to run it on Ubuntu 14.04 LTS but xcode only appears to
exist for Mac OS X.—
Reply to this email directly or view it on GitHub
#7 (comment)
.
*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE | (215) 755-1330 | punkave.com
(That's an easily installed package in Ubuntu. Just go into the package
manager and install the development stuff.)
On Mon, Jul 27, 2015 at 7:42 AM, Tom Boutell tom@punkave.com wrote:
What you need is a working C/C++ compiler environment, for whatever your
platform is.On Mon, Jul 27, 2015 at 7:37 AM, Claudio Kuenzler <
notifications@github.com> wrote:Thanks for your answer. So do I get this right, that it only works on Mac
OS X? I am trying to run it on Ubuntu 14.04 LTS but xcode only appears to
exist for Mac OS X.—
Reply to this email directly or view it on GitHub
#7 (comment)
.*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE | (215) 755-1330 | punkave.com
*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE | (215) 755-1330 | punkave.com
That's installed (build-essential package). gcc and g++ for example are both installed (required by the npm package).
# apt-get install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
binutils build-essential cpp cpp-4.8 dpkg-dev fakeroot g++ g++-4.8 gcc
gcc-4.8 gyp javascript-common libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan0 libatomic1
libc-ares-dev libc-ares2 libc-dev-bin libc6-dev libcloog-isl4 libdpkg-perl
libfakeroot libfile-fcntllock-perl libgcc-4.8-dev libgmp10 libgomp1 libisl10
libitm1 libjs-node-uuid libmpc3 libmpfr4 libquadmath0 libssl-dev libssl-doc
libstdc++-4.8-dev libtsan0 libv8-3.14-dev libv8-3.14.5 linux-libc-dev make
manpages-dev node-abbrev node-ansi node-archy node-async node-block-stream
node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent
node-form-data node-fstream node-fstream-ignore node-github-url-from-git
node-glob node-graceful-fs node-gyp node-inherits node-ini
node-json-stringify-safe node-lockfile node-lru-cache node-mime
node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
node-normalize-package-data node-npmlog node-once node-osenv node-qs
node-read node-read-package-json node-request node-retry node-rimraf
node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent
node-which nodejs nodejs-dev zlib1g-dev
Is there a way I can force a manual rebuild from your source? Unfortunately I don't know node.js enough, maybe that's even something very basic.
Doing "npm install -g mongo-dump-stream" again would probably do it.
On Mon, Jul 27, 2015 at 7:47 AM, Claudio Kuenzler notifications@github.com
wrote:
That's installed (build-essential package). gcc and g++ for example are
both installed (required by the npm package).apt-get install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
binutils build-essential cpp cpp-4.8 dpkg-dev fakeroot g++ g++-4.8 gcc
gcc-4.8 gyp javascript-common libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan0 libatomic1
libc-ares-dev libc-ares2 libc-dev-bin libc6-dev libcloog-isl4 libdpkg-perl
libfakeroot libfile-fcntllock-perl libgcc-4.8-dev libgmp10 libgomp1 libisl10
libitm1 libjs-node-uuid libmpc3 libmpfr4 libquadmath0 libssl-dev libssl-doc
libstdc++-4.8-dev libtsan0 libv8-3.14-dev libv8-3.14.5 linux-libc-dev make
manpages-dev node-abbrev node-ansi node-archy node-async node-block-stream
node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent
node-form-data node-fstream node-fstream-ignore node-github-url-from-git
node-glob node-graceful-fs node-gyp node-inherits node-ini
node-json-stringify-safe node-lockfile node-lru-cache node-mime
node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
node-normalize-package-data node-npmlog node-once node-osenv node-qs
node-read node-read-package-json node-request node-retry node-rimraf
node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent
node-which nodejs nodejs-dev zlib1g-devIs there a way I can force a manual rebuild from your source?
Unfortunately I don't know node.js enough, maybe that's even something very
basic.—
Reply to this email directly or view it on GitHub
#7 (comment)
.
*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE | (215) 755-1330 | punkave.com
Here's the output of the installation with npm, maybe you spot something which should be different?
# npm install -g mongo-dump-stream
npm http GET https://registry.npmjs.org/mongo-dump-stream
npm http 200 https://registry.npmjs.org/mongo-dump-stream
npm http GET https://registry.npmjs.org/mongo-dump-stream/-/mongo-dump-stream-0.3.3.tgz
npm http 200 https://registry.npmjs.org/mongo-dump-stream/-/mongo-dump-stream-0.3.3.tgz
npm http GET https://registry.npmjs.org/buffertools
npm http GET https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/yargs
npm http GET https://registry.npmjs.org/read-async-bson
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/bson
npm http 200 https://registry.npmjs.org/lodash
npm http 200 https://registry.npmjs.org/yargs
npm http 200 https://registry.npmjs.org/bson
npm http GET https://registry.npmjs.org/lodash/-/lodash-3.10.0.tgz
npm http GET https://registry.npmjs.org/yargs/-/yargs-3.15.0.tgz
npm http 200 https://registry.npmjs.org/async
npm http 200 https://registry.npmjs.org/buffertools
npm http 200 https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/bson/-/bson-0.2.22.tgz
npm http 200 https://registry.npmjs.org/lodash/-/lodash-3.10.0.tgz
npm http 200 https://registry.npmjs.org/yargs/-/yargs-3.15.0.tgz
npm http GET https://registry.npmjs.org/async/-/async-0.9.2.tgz
npm http GET https://registry.npmjs.org/buffertools/-/buffertools-2.1.3.tgz
npm http 200 https://registry.npmjs.org/bson/-/bson-0.2.22.tgz
npm http GET https://registry.npmjs.org/mongodb/-/mongodb-1.4.39.tgz
npm http 200 https://registry.npmjs.org/async/-/async-0.9.2.tgz
npm http 200 https://registry.npmjs.org/buffertools/-/buffertools-2.1.3.tgz
npm http 200 https://registry.npmjs.org/mongodb/-/mongodb-1.4.39.tgz
npm http 200 https://registry.npmjs.org/read-async-bson
npm http GET https://registry.npmjs.org/read-async-bson/-/read-async-bson-0.1.2.tgz
npm http 200 https://registry.npmjs.org/read-async-bson/-/read-async-bson-0.1.2.tgz
> buffertools@2.1.3 install /usr/local/lib/node_modules/mongo-dump-stream/node_modules/buffertools
> node-gyp rebuild
npm http GET https://registry.npmjs.org/cliui
npm http GET https://registry.npmjs.org/decamelize
npm http GET https://registry.npmjs.org/window-size
npm http GET https://registry.npmjs.org/camelcase
npm http 200 https://registry.npmjs.org/window-size
npm http 200 https://registry.npmjs.org/decamelize
npm http 200 https://registry.npmjs.org/camelcase
npm http GET https://registry.npmjs.org/window-size/-/window-size-0.1.2.tgz
npm http GET https://registry.npmjs.org/decamelize/-/decamelize-1.0.0.tgz
npm http GET https://registry.npmjs.org/camelcase/-/camelcase-1.1.0.tgz
npm http 200 https://registry.npmjs.org/cliui
npm http 200 https://registry.npmjs.org/window-size/-/window-size-0.1.2.tgz
npm http GET https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz
npm http 200 https://registry.npmjs.org/decamelize/-/decamelize-1.0.0.tgz
npm http 200 https://registry.npmjs.org/camelcase/-/camelcase-1.1.0.tgz
npm http 200 https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz
npm http GET https://registry.npmjs.org/center-align
npm http GET https://registry.npmjs.org/right-align
npm http GET https://registry.npmjs.org/wordwrap/0.0.2
npm http 200 https://registry.npmjs.org/center-align
npm http 200 https://registry.npmjs.org/right-align
npm http 200 https://registry.npmjs.org/wordwrap/0.0.2
npm http GET https://registry.npmjs.org/center-align/-/center-align-0.1.1.tgz
npm http GET https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz
npm http GET https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz
npm http 200 https://registry.npmjs.org/center-align/-/center-align-0.1.1.tgz
npm http 200 https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz
npm http 200 https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz
make: Entering directory `/usr/local/lib/node_modules/mongo-dump-stream/node_modules/buffertools/build'
CXX(target) Release/obj.target/buffertools/buffertools.o
npm http GET https://registry.npmjs.org/align-text
npm http GET https://registry.npmjs.org/align-text
npm http 200 https://registry.npmjs.org/align-text
npm http 200 https://registry.npmjs.org/align-text
npm http GET https://registry.npmjs.org/kerberos/0.0.11
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz
npm http 200 https://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz
npm http 200 https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz
npm http 200 https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.2.tgz
npm http GET https://registry.npmjs.org/repeat-string
npm http GET https://registry.npmjs.org/kind-of
npm http GET https://registry.npmjs.org/longest
npm http 200 https://registry.npmjs.org/longest
npm http 200 https://registry.npmjs.org/repeat-string
npm http 200 https://registry.npmjs.org/kind-of
npm http GET https://registry.npmjs.org/longest/-/longest-1.0.1.tgz
npm http GET https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.2.tgz
npm http GET https://registry.npmjs.org/kind-of/-/kind-of-2.0.0.tgz
npm http GET https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/longest/-/longest-1.0.1.tgz
npm http 200 https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.2.tgz
npm http 200 https://registry.npmjs.org/kind-of/-/kind-of-2.0.0.tgz
npm http 200 https://registry.npmjs.org/kerberos/0.0.11
npm http GET https://registry.npmjs.org/kerberos/-/kerberos-0.0.11.tgz
npm http 200 https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/nan/-/nan-1.8.4.tgz
npm http 200 https://registry.npmjs.org/kerberos/-/kerberos-0.0.11.tgz
npm http 200 https://registry.npmjs.org/nan/-/nan-1.8.4.tgz
SOLINK_MODULE(target) Release/obj.target/buffertools.node
SOLINK_MODULE(target) Release/obj.target/buffertools.node: Finished
COPY Release/buffertools.node
make: Leaving directory `/usr/local/lib/node_modules/mongo-dump-stream/node_modules/buffertools/build'
> bson@0.2.22 install /usr/local/lib/node_modules/mongo-dump-stream/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/process-nextick-args
npm http GET https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/util-deprecate
npm http 200 https://registry.npmjs.org/inherits
npm http 200 https://registry.npmjs.org/core-util-is
npm http 200 https://registry.npmjs.org/process-nextick-args
npm http 200 https://registry.npmjs.org/isarray/0.0.1
npm http 200 https://registry.npmjs.org/string_decoder
npm http 200 https://registry.npmjs.org/util-deprecate
npm http GET https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz
npm http GET https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz
npm http GET https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.2.tgz
npm http GET https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz
npm http GET https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz
npm http GET https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
npm http 200 https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz
npm http 200 https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.2.tgz
npm http 200 https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz
npm http 200 https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz
npm http 200 https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz
npm http 200 https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
> kerberos@0.0.11 install /usr/local/lib/node_modules/mongo-dump-stream/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
/usr/local/bin/mongo-dump-stream -> /usr/local/lib/node_modules/mongo-dump-stream/bin/mongo-dump-stream
/usr/local/bin/mongo-load-stream -> /usr/local/lib/node_modules/mongo-dump-stream/bin/mongo-load-stream
Hi Tom,
If you find the time to test it on Ubuntu I'd appreciate if you could update this issue. I'll gladly retry it then. Otherwise don't worry about it. Thanks for your efforts so far. cheers.