lwille/node-gphoto2

Linking Error: Installation fails allthough libgphoto2 is installed correctly

foxinsox opened this issue · 2 comments

Hey everyone,
i tried to install node-gphoto2, but unfortunately it didn't work. It seems like i run into a linking problem with 'gphoto/gphoto2-camera.h' even though i properly installed (and used) gphoto2 and libgphoto2.
Is there any way to fix this? I'd appreciate any hints and help! :)
Please refer to the terminal log for further details and don't hesitate to come back if there's more information required.
Many thanks in advance!

##############################################################

`
mpf-2:gphotoNPM Alex$ gphoto2 -v
gphoto2 2.5.11

Copyright (c) 2000-2016 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2 2.5.11 clang, popt(m), no exif, no cdk, no aa, jpeg, readline
libgphoto2 2.5.12 all camlibs, clang, ltdl, no EXIF
libgphoto2_port 0.12.0 clang, ltdl, USB, serial without locking

mpf-2:gphotoNPM Alex$ npm -v
4.0.5

mpf-2:gphotoNPM Alex$ npm install gphoto2

gphoto2@0.1.7 preinstall /Users/Alex/Documents/OMDigital/gphotoNPM/node_modules/.staging/gphoto2-0659b065
((which pkg-config && pkg-config libgphoto2) || (which dpkg && dpkg -s libgphoto2-2-dev) || (which brew && brew list libgphoto2) || (echo 'ERROR: libgphoto2 seems not to be installed.' 1>&2; exit 1)) && node-gyp rebuild

/usr/local/bin/pkg-config
gyp WARN EACCES user "Alex" does not have permission to access the dev dir "/Users/Alex/.node-gyp/7.4.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/var/folders/dz/hq9b2nhs4cd1wy_8pjpzry_80000gp/T/.node-gyp"
2017-02-20 13:26:05.177 xcodebuild[92709:977570] [MT] PluginLoading: Required plug-in compatibility UUID E0A62D1F-3C18-4D74-BFE5-A4167D643966 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
CXX(target) Release/obj.target/gphoto2/src/autodetect.o
../src/autodetect.cc:3:10: fatal error: 'gphoto2/gphoto2-camera.h' file not found
#include <gphoto2/gphoto2-camera.h>
^
1 error generated.
make: *** [Release/obj.target/gphoto2/src/autodetect.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:215:12)
gyp ERR! System Darwin 16.4.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/Alex/Documents/OMDigital/gphotoNPM/node_modules/.staging/gphoto2-0659b065
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/Alex/Documents/OMDigital/gphotoNPM/package.json'
npm WARN gphotoNPM No description
npm WARN gphotoNPM No repository field.
npm WARN gphotoNPM No README data
npm WARN gphotoNPM No license field.
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "gphoto2"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE

npm ERR! gphoto2@0.1.7 preinstall: ((which pkg-config && pkg-config libgphoto2) || (which dpkg && dpkg -s libgphoto2-2-dev) || (which brew && brew list libgphoto2) || (echo 'ERROR: libgphoto2 seems not to be installed.' 1>&2; exit 1)) && node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gphoto2@0.1.7 preinstall script '((which pkg-config && pkg-config libgphoto2) || (which dpkg && dpkg -s libgphoto2-2-dev) || (which brew && brew list libgphoto2) || (echo 'ERROR: libgphoto2 seems not to be installed.' 1>&2; exit 1)) && 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 gphoto2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ((which pkg-config && pkg-config libgphoto2) || (which dpkg && dpkg -s libgphoto2-2-dev) || (which brew && brew list libgphoto2) || (echo 'ERROR: libgphoto2 seems not to be installed.' 1>&2; exit 1)) && node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs gphoto2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls gphoto2
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/Alex/Documents/OMDigital/gphotoNPM/npm-debug.log
`

Sija commented

Duplicate of #83, #84 and possible others.

Sija commented

There are other errors pointing at possible culprit.

gyp WARN EACCES user "Alex" does not have permission to access the dev dir "/Users/Alex/.node-gyp/7.4.0"

Other than that, current version of the library works only with node.js v0.10.x.
See updates in #94.