node-authenticate-pam icon indicating copy to clipboard operation
node-authenticate-pam copied to clipboard

Install error

Open boxbillinggit opened this issue 9 years ago • 4 comments

make: Wejście do katalogu '/home/panel/node_modules/authenticate-pam/build'
  CXX(target) Release/obj.target/authenticate_pam/authenticate_pam.o
In file included from ../authenticate_pam.cc:23:0:
../../nan/nan.h:324:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
   static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
                                               ^
authenticate_pam.target.mk:84: polecenia dla obiektu 'Release/obj.target/authenticate_pam/authenticate_pam.o' nie powiodły się
make: *** [Release/obj.target/authenticate_pam/authenticate_pam.o] Błąd 1
make: Opuszczenie katalogu '/home/panel/node_modules/authenticate-pam/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/panel/node_modules/authenticate-pam
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the authenticate-pam 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 authenticate-pam
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "authenticate-pam"
npm ERR! cwd /home/panel
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/panel/npm-debug.log
npm ERR! not ok code 0

boxbillinggit avatar Oct 04 '16 10:10 boxbillinggit

I was able to fix this issue by installing the development version of PAM on my Ubuntu system by using apt install libpam0g-dev. This module compiles itself using PAM source code only shipped with development packages on most major Linux distributions.

@Rush, The README should inform users that this module requires PAM source to install correctly.

domkalan avatar Mar 19 '17 19:03 domkalan

@domkalan Thank you, it works for me. I spent 2 hours chasing down the rabbit hole thinking something was wrong with my node-gyp, heh.

BundoBytes avatar Aug 01 '18 15:08 BundoBytes

Thanks @domkalan, that fixed it for me! I've created a PR #28 with your suggestion - @Rush

RaisinBread42 avatar Jan 04 '19 23:01 RaisinBread42

I got a similar error,

/home/lennonmclean/.cache/node-gyp/12.16.3/include/node/node.h:608:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../authenticate_pam.cc:175:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(authenticate_pam, init);
 ^~~~~~~~~~~
../authenticate_pam.cc:175:31: note: suggested alternative: ‘int’
 NODE_MODULE(authenticate_pam, init);
                               ^~~~
/home/lennonmclean/.cache/node-gyp/12.16.3/include/node/node.h:608:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../authenticate_pam.cc:175:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(authenticate_pam, init);
 ^~~~~~~~~~~
make: *** [authenticate_pam.target.mk:109: Release/obj.target/authenticate_pam/authenticate_pam.o] Error 1
make: Leaving directory '/home/lennonmclean/node_modules/authenticate-pam/build'
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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.0-12-686-pae
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 /home/lennonmclean/node_modules/authenticate-pam
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/home/lennonmclean/package.json'
npm WARN lennonmclean No description
npm WARN lennonmclean No repository field.
npm WARN lennonmclean No README data
npm WARN lennonmclean No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/lennonmclean/.npm/_logs/2020-11-02T14_48_24_743Z-debug.log

The important bit being

make: *** [authenticate_pam.target.mk:109: Release/obj.target/authenticate_pam/authenticate_pam.o] Error 1
make: Leaving directory '/home/lennonmclean/node_modules/authenticate-pam/build'

thecoder08 avatar Nov 02 '20 14:11 thecoder08