npm install grpc fail

1,330 views
Skip to first unread message

André Abreu

unread,
Jul 23, 2015, 10:26:48 AM7/23/15
to grpc.io
I am trying to install grpc with npm but I get this log.

➜  complete  npm install grpc
/
> gr...@0.10.0 install /Users/andreabreu/Downloads/io2015-codelabs-master/gRPC/complete/node_modules/grpc
> node-gyp rebuild

  CXX(target) Release/obj.target/grpc/ext/byte_buffer.o
../ext/byte_buffer.cc:60:33: error: use of undeclared identifier 'grpc_raw_byte_buffer_create'; did you mean 'grpc_byte_buffer_create'?
  grpc_byte_buffer *byte_buffer(grpc_raw_byte_buffer_create(&slice, 1));
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                grpc_byte_buffer_create
/usr/local/include/grpc/grpc.h:166:19: note: 'grpc_byte_buffer_create' declared here
grpc_byte_buffer *grpc_byte_buffer_create(gpr_slice *slices, size_t nslices);
                  ^
../ext/byte_buffer.cc:74:3: error: use of undeclared identifier 'grpc_byte_buffer_reader_init'; did you mean 'grpc_byte_buffer_reader_next'?
  grpc_byte_buffer_reader_init(&reader, buffer);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  grpc_byte_buffer_reader_next
/usr/local/include/grpc/grpc.h:180:5: note: 'grpc_byte_buffer_reader_next' declared here
int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader,
    ^
../ext/byte_buffer.cc:74:41: error: cannot initialize a parameter of type 'gpr_slice *' with an lvalue of type 'grpc_byte_buffer *'
  grpc_byte_buffer_reader_init(&reader, buffer);
                                        ^~~~~~
/usr/local/include/grpc/grpc.h:181:45: note: passing argument to parameter 'slice' here
                                 gpr_slice *slice);
                                            ^
3 errors generated.
make: *** [Release/obj.target/grpc/ext/byte_buffer.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/andreabreu/Downloads/io2015-codelabs-master/gRPC/complete/node_modules/grpc
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "grpc"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE

npm ERR! gr...@0.10.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the gr...@0.10.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the grpc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls grpc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/andreabreu/Downloads/io2015-codelabs-master/gRPC/complete/npm-debug.log


Michael Lumish

unread,
Jul 23, 2015, 11:50:03 AM7/23/15
to André Abreu, grpc.io
The version of the Node library you are trying to install is newer than the version of the C core library you have installed. You should install the gRPC C core from the latest release (https://github.com/grpc/grpc/releases).

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/a28526a3-f982-4e08-b7df-8877ee35607a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

André Abreu

unread,
Jul 23, 2015, 1:14:36 PM7/23/15
to grpc.io, mlu...@google.com
I installed from the latest release.

 $ cd grpc
 $ git submodule update --init
 $ make 
 $ sudo make install

It continues to give me the same log error.

Nicolas Noble

unread,
Jul 23, 2015, 1:18:07 PM7/23/15
to André Abreu, grpc.io, mlu...@google.com

Could you please send the error log that is generated and specified at the end of your email?


--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.

Michael Lumish

unread,
Jul 23, 2015, 1:54:26 PM7/23/15
to Nicolas Noble, André Abreu, grpc.io
That's not the latest release, that's HEAD. If you want to install from release, you should either use the link I provided, or after your second line run

$ git fetch
$ git checkout release-0_10_0

André Abreu

unread,
Jul 24, 2015, 6:22:47 AM7/24/15
to grpc.io, nno...@google.com, mlu...@google.com
Thanks Michael, it works now.
Reply all
Reply to author
Forward
0 new messages