fuwaneko / node-protobuf

Google Protocol Buffers wrapper for Node.js [UNMAINTAINED]
181 stars 42 forks source link

Installation Problems #62

Closed findlay-hannam closed 8 years ago

findlay-hannam commented 8 years ago

I'm trying to run an app that works fine on a colleague's computer. But when it gets to node-gyp rebuild, it fails with this message:

`> node-gyp rebuild

lp.sh: line 2: pkg-config: command not found gyp: Call to 'sh lp.sh' returned exit status 0 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/Users/hannamf/.nvm/versions/node/v5.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Darwin 14.4.0 gyp ERR! command "/Users/hannamf/.nvm/versions/node/v5.6.0/bin/node" "/Users/hannamf/.nvm/versions/node/v5.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/hannamf/Documents/Repositories/article-page/node_modules/node-protobuf gyp ERR! node -v v5.6.0 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm ERR! Darwin 14.4.0 npm ERR! argv "/Users/hannamf/.nvm/versions/node/v5.6.0/bin/node" "/Users/hannamf/.nvm/versions/node/v5.6.0/bin/npm" "install" npm ERR! node v5.6.0 npm ERR! npm v3.6.0 npm ERR! code ELIFECYCLE

npm ERR! node-protobuf@1.2.12 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-protobuf@1.2.12 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the node-protobuf 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 information on how to open an issue for this project with: npm ERR! npm bugs node-protobuf npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-protobuf npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:`

And references a log file, the text for which is attached.

debug-log.txt

Any help would be appreciated.

fuwaneko commented 8 years ago

You have 3 options:

  1. Use 1.2.11
  2. Install pkg-config (on Windows I think it's available in MinGW, but you're on your own with setting it up to work with protobuf)
  3. Set LIBPROTOBUF environment variable pointing to protobuf location on your system (recommended way)
findlay-hannam commented 8 years ago

Installed pkg-config, it works! Thanks