rlidwka / node-fann

FANN (Fast Artificial Neural Network Library) bindings for Node.js
185 stars 34 forks source link

Error when sudo npm install fann #26

Open SamanShafigh opened 8 years ago

SamanShafigh commented 8 years ago

Hi,

I try to install this package but I get this error, I already have installed glib2 and pkg-config ///////////////////////////////////////////////////////////////////////////////////////////////////// /

fann@1.0.0 install /home/saman/node_modules/fann node-gyp rebuild

gyp: Call to 'pkg-config --atleast-version=2.1.0 fann' returned exit status 1 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/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) 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 Linux 3.11.0-26-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/saman/node_modules/fann gyp ERR! node -v v4.4.2 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Linux 3.11.0-26-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "fann" npm ERR! node v4.4.2 npm ERR! npm v2.15.0 npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request: npm ERR! /home/saman/FANN/npm-debug.log

/////////////////////////////////////////////////////////////////////////////////////////////////////

Thanks

SamanShafigh commented 8 years ago

I fixed my issue, so things works fine. 1) First fixed the version of fann in pkg-config (Based on @Waxo suggestion in issue #13 ) 2) Then I downgrade my node version from 4.4.2 to 0.12.4 so I used https://github.com/tj/n to do it easily