maierfelix / maierfelix/POGOserver

npm install on Mac OSX El Capitan

Open
#292 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
476
Forks
198
PR merge metrics
No merged PRs in 30d

Description

I was following the Mac OSX install guide from the wiki. It's pretty good, but I ran into an error: pkg-config not found.

```
$ npm install

> node-protobuf@1.4.1 install /Users/vkwok/workspace/POGOserver/node_modules/node-protobuf
> 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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215: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/vkwok/workspace/POGOserver/node_modules/node-protobuf
gyp ERR! node -v v6.7.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN POGOServer@0.6.1 license should be a valid SPDX license expression
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! node-protobuf@1.4.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-protobuf@1.4.1 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:
npm ERR! /Users/vkwok/workspace/POGOserver/npm-debug.log
```

I fixed this by installing pkg-config:

```
$ curl https://pkg-config.freedesktop.org/releases/pkg-config-0.28.tar.gz -o pkgconfig.tgz
$ tar -zxf pkgconfig.tgz && cd pkg-config-0.28
$ ./configure && make install
```

If there's an error like this:

```
configure: error: Either a previously installed pkg-config or "glib-2.0 >= 2.16" could not be found. Please set GLIB_CFLAGS and GLIB_LIBS to the correct values or pass --with-internal-glib to configure to use the bundled copy.
```

Then run `./configure --with-internal-glib && make install`

Not sure if any of you also ran into this, but I thought it'd be nice to add to the existing wiki.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Mac OSX install guide in the wiki and review the reported npm install output involving node-protobuf and pkg-config. Update the guide with the pkg-config installation commands and the --with-internal-glib fallback, then verify that the documented steps address the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.