fuwaneko / node-protobuf

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

npm install failure at node-gyp rebuild #77

Closed gladiahotan closed 8 years ago

gladiahotan commented 8 years ago

Hi, I'm working on OS X and I have run brew install pkg-config and brew install --devel protobuf. However, npm install fails at node-gyp rebuild. The error message suggested that I should add the directory containing `protobuf.pc' to the PKG_CONFIG_PATH environment variable.

I ran export PKG_CONFIG_PATH=$(/usr/local/lib/pkgconfig/), but this did not seem to change my environment variable (running 'env' shows the PKG_CONFIG_PATH as blank).

I also did: nano .bash_profile Added the line PKG_CONFIG_PATH=$(/usr/local/lib/pkgconfig/) to the .bash_profile file and saved it Then did: source .bash_profile But it returns: -bash: /usr/local/lib/pkgconfig/: is a directory Then I ran 'env' and PKG_CONFIG_PATH is still blank.

I have attached the error log. Any help would be greatly appreciated!

Thank you.

npm-debug.txt

The full error message is here: node-gyp rebuild

Package protobuf was not found in the pkg-config search path. Perhaps you should add the directory containing protobuf.pc' to the PKG_CONFIG_PATH environment variable No package 'protobuf' 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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Darwin 15.6.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/gladia/pokemon-go-mitm-node/node_modules/pokemongo-protobuf/node_modules/node-protobuf gyp ERR! node -v v4.4.7 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v4.4.7 npm ERR! npm v2.15.8 npm ERR! code ELIFECYCLE

npm ERR! node-protobuf@1.3.2 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-protobuf@1.3.2 install script 'node-gyp rebuild'. npm ERR! 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 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: npm ERR! /Users/gladia/pokemon-go-mitm-node/npm-debug.log

fuwaneko commented 8 years ago

It's export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig. Note the absence of $() operator.

gladiahotan commented 8 years ago

It worked. Thank you!