redis / hiredis-node

Node wrapper for hiredis
BSD 3-Clause "New" or "Revised" License
305 stars 84 forks source link

Cannot install hiredis on mac #110

Closed aeisenberg closed 8 years ago

aeisenberg commented 8 years ago

I am unable to install hiredis on my mac. I tried both the latest version and version 0.4.0 and I am getting the same error. Environment:

Any ideas what is happening here?

Here is the verbose output from my install:

$ npm install --loglevel=verbose hiredis@0.4.0
npm info it worked if it ends with ok
npm verb cli [ '/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/bin/node',
npm verb cli   '/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/bin/npm',
npm verb cli   'install',
npm verb cli   '--loglevel=verbose',
npm verb cli   'hiredis@0.4.0' ]
npm info using npm@3.3.12
npm info using node@v5.3.0
npm verb request uri https://registry.npmjs.org/hiredis
npm verb request no auth needed
npm info attempt registry request try #1 at 11:10:05 AM
npm verb request id 2ebc081c0b42f0c9
npm verb etag "DZ9Y9UR1ZE0XKKCEZ8I6EYVOB"
npm http request GET https://registry.npmjs.org/hiredis
npm http 304 https://registry.npmjs.org/hiredis
npm verb headers { date: 'Wed, 20 Jan 2016 19:10:06 GMT',
npm verb headers   via: '1.1 varnish',
npm verb headers   'cache-control': 'max-age=300',
npm verb headers   etag: '"DZ9Y9UR1ZE0XKKCEZ8I6EYVOB"',
npm verb headers   age: '46',
npm verb headers   connection: 'keep-alive',
npm verb headers   'x-served-by': 'cache-lax1434-LAX',
npm verb headers   'x-cache': 'HIT',
npm verb headers   'x-cache-hits': '1',
npm verb headers   'x-timer': 'S1453317006.071740,VS0,VE0',
npm verb headers   vary: 'Accept' }
npm verb etag https://registry.npmjs.org/hiredis from cache
npm verb get saving hiredis to /Users/andrew.eisenberg/.npm/registry.npmjs.org/hiredis/.cache.json
npm verb cache add spec hiredis@0.4.0
npm verb addNamed "0.4.0" is a plain semver version for hiredis
npm verb addNameVersion registry:https://registry.npmjs.org/hiredis not in flight; fetching
npm verb get https://registry.npmjs.org/hiredis not expired, no request
npm verb addRemoteTarball https://registry.npmjs.org/hiredis/-/hiredis-0.4.0.tgz not in flight; adding
npm verb addRemoteTarball [ 'https://registry.npmjs.org/hiredis/-/hiredis-0.4.0.tgz',
npm verb addRemoteTarball   '5c5fb3d3a306bc2ed9bfa92449753f21e34247de' ]
npm info retry fetch attempt 1 at 11:10:07 AM
npm info attempt registry request try #1 at 11:10:07 AM
npm http fetch GET https://registry.npmjs.org/hiredis/-/hiredis-0.4.0.tgz
npm http fetch 200 https://registry.npmjs.org/hiredis/-/hiredis-0.4.0.tgz
npm verb addTmpTarball /var/folders/36/yjgv05hn78b4xn331jdt8klrcvt5zc/T/npm-32994-8555f493/registry.npmjs.org/hiredis/-/hiredis-0.4.0.tgz not in flight; adding
npm verb addTmpTarball already have metadata; skipping unpack for hiredis@0.4.0
npm verb afterAdd /Users/andrew.eisenberg/.npm/hiredis/0.4.0/package/package.json not in flight; writing
npm verb afterAdd /Users/andrew.eisenberg/.npm/hiredis/0.4.0/package/package.json written
npm verb request uri https://registry.npmjs.org/nan
npm verb request no auth needed
npm info attempt registry request try #1 at 11:10:07 AM
npm verb etag "798MRG5PQ3TIGV0CLUOSQMVAG"
npm http request GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm verb headers { date: 'Wed, 20 Jan 2016 19:10:07 GMT',
npm verb headers   via: '1.1 varnish',
npm verb headers   'cache-control': 'max-age=300',
npm verb headers   etag: '"798MRG5PQ3TIGV0CLUOSQMVAG"',
npm verb headers   age: '262',
npm verb headers   connection: 'keep-alive',
npm verb headers   'x-served-by': 'cache-lax1420-LAX',
npm verb headers   'x-cache': 'HIT',
npm verb headers   'x-cache-hits': '18',
npm verb headers   'x-timer': 'S1453317007.850329,VS0,VE0',
npm verb headers   vary: 'Accept' }
npm verb etag https://registry.npmjs.org/nan from cache
npm verb get saving nan to /Users/andrew.eisenberg/.npm/registry.npmjs.org/nan/.cache.json
npm verb cache add spec nan@^1.8.4
npm verb addNamed ">=1.8.4 <2.0.0" is a valid semver range for nan
npm verb addNameRange registry:https://registry.npmjs.org/nan not in flight; fetching
npm verb get https://registry.npmjs.org/nan not expired, no request
npm verb addNamed "1.9.0" is a plain semver version for nan
npm verb afterAdd /Users/andrew.eisenberg/.npm/nan/1.9.0/package/package.json not in flight; writing
npm verb afterAdd /Users/andrew.eisenberg/.npm/nan/1.9.0/package/package.json written
npm verb lock using /Users/andrew.eisenberg/.npm/_locks/staging-45fc9efdc929a60d.lock for /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.staging
npm verb unbuild node_modules/.staging/nan-7b14882243f83979a94bd918f0d1552a
npm verb unbuild node_modules/.staging/hiredis-e52d8081c72c0f80d9fc979773868ea7
npm verb gentlyRm don't care about contents; nuking /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.staging/nan-7b14882243f83979a94bd918f0d1552a
npm verb gentlyRm don't care about contents; nuking /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.staging/hiredis-e52d8081c72c0f80d9fc979773868ea7
npm verb tar unpack /Users/andrew.eisenberg/.npm/nan/1.9.0/package.tgz
npm verb tar unpacking to /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.staging/nan-7b14882243f83979a94bd918f0d1552a
npm verb tar unpack /Users/andrew.eisenberg/.npm/hiredis/0.4.0/package.tgz
npm verb tar unpacking to /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.staging/hiredis-e52d8081c72c0f80d9fc979773868ea7
npm verb gentlyRm don't care about contents; nuking /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.staging/nan-7b14882243f83979a94bd918f0d1552a
npm verb gentlyRm don't care about contents; nuking /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.staging/hiredis-e52d8081c72c0f80d9fc979773868ea7
npm info lifecycle nan@1.9.0~preinstall: nan@1.9.0
npm info lifecycle hiredis@0.4.0~preinstall: hiredis@0.4.0
npm info linkStuff nan@1.9.0
npm verb linkBins nan@1.9.0
npm verb linkMans nan@1.9.0
npm info linkStuff hiredis@0.4.0
npm verb linkBins hiredis@0.4.0
npm verb linkMans hiredis@0.4.0
npm info lifecycle nan@1.9.0~install: nan@1.9.0
npm info lifecycle hiredis@0.4.0~install: hiredis@0.4.0

> hiredis@0.4.0 install /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp verb cli [ '/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/bin/node',
gyp verb cli   '/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild' ]
gyp info using node-gyp@3.0.3
gyp info using node@5.3.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "/usr/bin/python2.7" in the PATH
gyp verb `which` succeeded /usr/bin/python2.7 /usr/bin/python2.7
gyp verb check python version `/usr/bin/python2.7 -c "import platform; print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 5.3.0
gyp verb command install [ '5.3.0' ]
gyp verb install input version string "5.3.0"
gyp verb install installing version: 5.3.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 5.3.0
gyp verb build dir attempting to create "build" dir: /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis/build
gyp verb build dir "build" dir needed to be created? /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis/config.gypi
gyp verb common.gypi checking for gypi file: /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2.7
gyp info spawn args [ '/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/andrew.eisenberg/.node-gyp/5.3.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/andrew.eisenberg/.node-gyp/5.3.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /Users/andrew.eisenberg/.node-gyp/5.3.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
  cc '-DNODE_GYP_MODULE_NAME=hiredis-c' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/Users/andrew.eisenberg/.node-gyp/5.3.0/include/node -I/Users/andrew.eisenberg/.node-gyp/5.3.0/src -I/Users/andrew.eisenberg/.node-gyp/5.3.0/deps/uv/include -I/Users/andrew.eisenberg/.node-gyp/5.3.0/deps/v8/include  -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c99 -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/hiredis-c/deps/hiredis/sds.o.d.raw  -c -o Release/obj.target/hiredis-c/deps/hiredis/sds.o ../deps/hiredis/sds.c
  cc '-DNODE_GYP_MODULE_NAME=hiredis-c' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/Users/andrew.eisenberg/.node-gyp/5.3.0/include/node -I/Users/andrew.eisenberg/.node-gyp/5.3.0/src -I/Users/andrew.eisenberg/.node-gyp/5.3.0/deps/uv/include -I/Users/andrew.eisenberg/.node-gyp/5.3.0/deps/v8/include  -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c99 -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/hiredis-c/deps/hiredis/read.o.d.raw  -c -o Release/obj.target/hiredis-c/deps/hiredis/read.o ../deps/hiredis/read.c
  rm -f Release/hiredis-c.a && ./gyp-mac-tool filter-libtool libtool  -static -o Release/hiredis-c.a Release/obj.target/hiredis-c/deps/hiredis/sds.o Release/obj.target/hiredis-c/deps/hiredis/read.o
  File "./gyp-mac-tool", line 225
    fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
                                                                   ^
SyntaxError: invalid syntax
make: *** [Release/hiredis-c.a] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
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.2.0
gyp ERR! command "/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/bin/node" "/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm verb lifecycle hiredis@0.4.0~install: unsafe-perm in lifecycle true
npm verb lifecycle hiredis@0.4.0~install: PATH: /Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis/node_modules/.bin:/Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.3/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/andrew.eisenberg/.rvm/gems/ruby-2.1.1/bin:/Users/andrew.eisenberg/.rvm/gems/ruby-2.1.1@global/bin:/Users/andrew.eisenberg/.rvm/rubies/ruby-2.1.1/bin:/sw/bin:/sw/sbin:/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/bin:/usr/local/heroku/bin:/Users/andrew.eisenberg/NonEclipse/Maven/apache-maven-3.0.5/bin:/Users/andrew.eisenberg/NonEclipse/gradle/gradle-0.9-rc-1/bin:/opt/subversion/bin:/bin:/usr/X11R6/bin:usr/local/X11/bin:/Users/andrew.eisenberg/bin:/usr/local/bin:/usr/X11R6/lib:/usr/X11R6/include/X11:/Users/andrew.eisenberg/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/lib:.:/Library/Frameworks/Python.framework/Versions/3.3/bin:/usr/local/git/bin::/Users/andrew.eisenberg/NonEclipse/Groovy/groovy-2.2.1/bin:/Users/andrew.eisenberg/Eclipse/Installations/grails-2.1.1/bin:/Users/andrew.eisenberg/NonEclipse/Griffon/griffon-0.9.2/bin:/Users/andrew.eisenberg/Eclipse/git-repos/scripted/bin:/Users/andrew.eisenberg/NonEclipse/scala/scala-2.11.4/bin:/usr/local/nginx/sbin:/Users/andrew.eisenberg/.rvm/bin
npm verb lifecycle hiredis@0.4.0~install: CWD: /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/hiredis
npm info lifecycle hiredis@0.4.0~install: Failed to exec install script
npm verb unlock done using /Users/andrew.eisenberg/.npm/_locks/staging-45fc9efdc929a60d.lock for /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/node_modules/.staging
npm verb stack Error: hiredis@0.4.0 install: `node-gyp rebuild`
npm verb stack Exit status 1
npm verb stack     at EventEmitter.<anonymous> (/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
npm verb stack     at emitTwo (events.js:87:13)
npm verb stack     at EventEmitter.emit (events.js:172:7)
npm verb stack     at ChildProcess.<anonymous> (/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/lib/node_modules/npm/lib/utils/spawn.js:24:14)
npm verb stack     at emitTwo (events.js:87:13)
npm verb stack     at ChildProcess.emit (events.js:172:7)
npm verb stack     at maybeClose (internal/child_process.js:818:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm verb pkgid hiredis@0.4.0
npm verb cwd /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face
npm ERR! Darwin 15.2.0
npm ERR! argv "/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/bin/node" "/Users/andrew.eisenberg/.nvm/versions/node/v5.3.0/bin/npm" "install" "--loglevel=verbose" "hiredis@0.4.0"
npm ERR! node v5.3.0
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! hiredis@0.4.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hiredis@0.4.0 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 hiredis 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 hiredis
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/andrew.eisenberg/Eclipse/git-repos/baalm-face/npm-debug.log

I am getting the same error when I install 0.4.1. Also attaching a zip of my log file (when trying to install 0.4.1). npm-debug-log.zip

aeisenberg commented 8 years ago

Apologies for the noise. Working now. I think my local npm registry got corrupted since I was originally trying to compile with python 2.5 and the installation failed in a different way.

aeisenberg commented 8 years ago

Would be nice if your docs mentioned somewhere what version of python is required for installation.

aeisenberg commented 8 years ago

Done: https://github.com/redis/hiredis-node/pull/111