[英]Unable to install LDAP in node 12.7
I've upgraded my node version from 10 to 12.7 after which my LDAP module did not work.When i tried to install the latest LDAP version i got the below error 我已将节点版本从10升级到12.7,此后我的LDAP模块不起作用。当我尝试安装最新的LDAP版本时,出现以下错误
npm install LDAP npm安装LDAP
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.7"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/ubuntu/node_modules/LDAP/.node-gyp"
make: Entering directory `/home/ubuntu/node_modules/LDAP/build'
CXX(target) Release/obj.target/LDAP/src/LDAP.o
../src/LDAP.cc:10:18: fatal error: ldap.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/LDAP/src/LDAP.o] Error 1
make: Leaving directory `/home/ubuntu/node_modules/LDAP/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/node- gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.2.0-40-virtual
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/ubuntu/node_modules/LDAP
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok
npm ERR! Linux 3.2.0-40-virtual
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "LDAP"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! LDAP@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the LDAP@1.2.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the LDAP 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 LDAP
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/npm-debug.log
and when i googled i came across the below thread 当我用谷歌搜索时,我遇到了以下线程
https://github.com/jeremycx/node-LDAP/issues/70 https://github.com/jeremycx/node-LDAP/issues/70
which says that The v8 C API has changed dramatically in Node.js 0.12 compared to 0.10. 表示在Node.js 0.12中,v8 C API的变化比0.10显着。 Unfortunately, adaptation of the code would require epic refactoring of the C codebase.. 不幸的是,代码的修改将要求对C代码库进行史诗般的重构。
Does that mean that the LDAP module does not support in the latest node or have i missed something .... kindly help 这是否意味着LDAP模块在最新节点中不支持,或者我错过了某件事....请帮助
尝试这个
sudo apt-get install libldap2-dev
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.