aaronm67 / node-phash

Phash Bindings for Node.js
163 stars 41 forks source link

npm install phash on Mac 10.11, ./phash.cpp:3:10: fatal error: 'pHash.h' file not found #23

Open mozillo opened 8 years ago

mozillo commented 8 years ago

This is the output:

phash@0.0.5 install /usr/local/lib/node_modules/phash node-gyp rebuild

CXX(target) Release/obj.target/pHash/phash.o ../phash.cpp:3:10: fatal error: 'pHash.h' file not found

include

JonathanMalott commented 8 years ago

for the love of god, does anyone know how to solve this issue?

dreampulse commented 8 years ago

+1

dreampulse commented 8 years ago

https://github.com/nodejs/node-gyp/issues/696

teamhail commented 8 years ago

+1

kurtcorbett commented 8 years ago

+1

yangpu commented 8 years ago

The same issue for node.js 0.12.7 on Ubuntu 14

Paxa commented 8 years ago

Should be fixed by https://github.com/aaronm67/node-phash/pull/24

brandonmp commented 7 years ago

just installed today from npm and getting a similar error. is this fix in the current version? Ubuntu 16.10 Node 6.3.1 NPM 3.10.3 NVM 0.10.32 if that matters

$ npm install -D phash

> phash@0.0.5 install /home/bmp/code/wayhome/wayhome-utils/node_modules/phash
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_O
RG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_O
RG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_O
RG_MIRROR
make: Entering directory '/home/bmp/code/wayhome/wayhome-utils/node_modules/phash/build'
  CXX(target) Release/obj.target/pHash/phash.o
../phash.cpp:3:19: fatal error: pHash.h: No such file or directory
 #include <pHash.h>
                   ^
compilation terminated.
pHash.target.mk:84: recipe for target 'Release/obj.target/pHash/phash.o' failed
make: *** [Release/obj.target/pHash/phash.o] Error 1
make: Leaving directory '/home/bmp/code/wayhome/wayhome-utils/node_modules/phash/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/bmp/.nvm/versions/node/v6.3.1/lib/node_modules/npm/node_modu
les/node-gyp/lib/build.js:276:23)
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:204:12)
gyp ERR! System Linux 4.8.0-27-generic
gyp ERR! command "/home/bmp/.nvm/versions/node/v6.3.1/bin/node" "/home/bmp/.nvm/versions/node/v6.3.1/lib/node
_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/bmp/code/wayhome/wayhome-utils/node_modules/phash
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.15
npm ERR! Linux 4.8.0-27-generic
npm ERR! argv "/home/bmp/.nvm/versions/node/v6.3.1/bin/node" "/home/bmp/.nvm/versions/node/v6.3.1/bin/npm" "i
nstall" "-D" "phash"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! phash@0.0.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phash@0.0.5 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 phash 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 phash
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls phash
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/bmp/code/wayhome/wayhome-utils/npm-debug.log

ETA: same error w/ npm install phash@ 0.0.3, if that helps

brandonmp commented 7 years ago

i was able to fix this by building myself

make sure you have necessary stuff installed beforehand, like gcc. not sure what else is required

in my project:

cd node_modules
git clone https://github.com/aaronm67/node-phash.git ./phash
cd phash
npm install -g node-gyp
npm install
// unsure if these next 2 are necessary
node-gyp configure
node-gyp build

then require as normal

ghost commented 7 years ago

phash@0.0.5 install /Users/lenr/coding/server-shope/node_modules/phash node-gyp rebuild

CXX(target) Release/obj.target/pHash/phash.o ../phash.cpp:3:10: fatal error: 'pHash.h' file not found

include

     ^

1 error generated. make: *** [Release/obj.target/pHash/phash.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:276:23) 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:204: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/lenr/coding/server-shope/node_modules/phash gyp ERR! node -v v6.1.0 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm WARN thinkjs-application@1.0.0 No repository field. npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "phash" "--save" npm ERR! node v6.1.0 npm ERR! npm v3.9.6 npm ERR! code ELIFECYCLE

npm ERR! phash@0.0.5 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phash@0.0.5 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 phash 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 phash npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls phash npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/lenr/coding/server-shope/npm-debug.log

Paxa commented 7 years ago

Latest version was not published to npmjs.com yet At this time you can install from git:

npm install aaronm67/node-phash

Or add "phash": "github:aaronm67/node-phash" in package.json

mrnocreativity commented 5 years ago

Still happening to me. Anybody got ideas if this is related to the actual module or more related to the system i'm running this on?

node: v11.6.0 npm: 6.5.0-next.0 Mac Osx v10.14.1

srameshr commented 3 years ago

@aaronm67 The same error!

federicom-scale commented 2 years ago

This is still happening, any pointers?