Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mozillo opened this issue Oct 23, 2015 · 14 comments

Comments

@mozillo
Copy link

mozillo commented Oct 23, 2015

This is the output:

[email protected] 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 <pHash.h>

@JonathanMalott
Copy link

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

@dreampulse
Copy link

+1

@dreampulse
Copy link

nodejs/node-gyp#696

@teamhail
Copy link

teamhail commented Dec 4, 2015

+1

1 similar comment
@kurtcorbett
Copy link

+1

@yangpu
Copy link

yangpu commented Jan 12, 2016

The same issue for node.js 0.12.7 on Ubuntu 14

@Paxa
Copy link
Contributor

Paxa commented May 22, 2016

Should be fixed by #24

@brandonmp
Copy link

brandonmp commented Nov 20, 2016

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

> [email protected] 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: [email protected]
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! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Copy link

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
Copy link

ghost commented Nov 25, 2016

[email protected] 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 <pHash.h>
^
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 [email protected] 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! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Copy link
Contributor

Paxa commented Nov 26, 2016

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
Copy link

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
Copy link

@aaronm67 The same error!

@federicom-scale
Copy link

This is still happening, any pointers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests