我需要在MAC终端中将节点js与oracle db连接起来。 因此,对于安装,请尝试链接https://github.com/nearinfinity/node-oracle中的步骤 将即时客户端文件从oracle链接复制到路径/ usr / InstantClient /
中的文件夹后,我设置了以下路径 $ export OCI_INCLUDE_DIR=/usr/InstantClient/sdk/include
$ export OCI_LIB_DIR=/usr/InstantClient/
$ export LD_LIBRARY_PATH=/usr/InstantClient/
但是,得到错误如错误:至少有一个文件无法编译。
我在设置路径或环境变量时是否有任何错误?任何人都可以提供安装oracle模块与MAC终端中的节点一起使用的步骤吗? 感谢
编辑:我得到的错误列表如下npm install db-oracle
:
unameits-Mac-mini:InstantClient vinod$ npm install db-oracle
npm http GET https://registry.npmjs.org/db-oracle
npm http 304 https://registry.npmjs.org/db-oracle
> db-oracle@0.2.3 install /usr/InstantClient/node_modules/db-oracle
> node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local/Cellar/node/0.8.11
Checking for header occi.h : Missing include files for OCI
/usr/InstantClient/node_modules/db-oracle/wscript:42: error: the configuration failed (see '/usr/InstantClient/node_modules/db-oracle/build/config.log')
> db-oracle@0.2.3 preuninstall /usr/InstantClient/node_modules/db-oracle
> rm -rf build/*
npm ERR! db-oracle@0.2.3 install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the db-oracle@0.2.3 install script.
npm ERR! This is most likely a problem with the db-oracle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls db-oracle
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 11.3.0
npm ERR! command "/usr/local/Cellar/node/0.8.11/bin/node" "/usr/local/bin/npm" "install" "db-oracle"
npm ERR! cwd /usr/InstantClient
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/InstantClient/npm-debug.log
npm ERR! not ok code 0
我在npm install db-oracle
上得到的错误列表如下unameits-Mac-mini:InstantClient vinod $ npm install db-oracle npm http GET https://registry.npmjs.org/db-oracle npm http 304 https://registry.npmjs.org/db-oracle
db-oracle@0.2.3 install / usr / InstantClient / node_modules / db-oracle node-waf配置构建
检查程序g ++或c ++:/ usr / bin / g ++
检查程序cpp:/ usr / bin / cpp
检查程序ar:/ usr / bin / ar
检查程序ranlib:/ usr / bin / ranlib
检查g ++:ok
检查节点路径:未找到
检查节点前缀:ok /usr/local/Cellar/node/0.8.11
检查标题occi.h:缺少OCI的包含文件
/ usr / InstantClient / node_modules / db-oracle / wscript:42:错误:配置失败(请参阅'/usr/InstantClient/node_modules/db-oracle/build/config.log')
db-oracle@0.2.3 preuninstall / usr / InstantClient / node_modules / db-oracle rm -rf build / *
npm ERR! db-oracle@0.2.3安装:node-waf configure build
npm ERR! sh "-c" "node-waf configure build"
以1
npm ERR!
npm ERR! db-oracle@0.2.3安装脚本失败。
npm ERR!这很可能是db-oracle包的问题,
npm ERR!不是与npm本身。
npm ERR!告诉作者你的系统失败了:
npm ERR! node-waf配置构建
npm ERR!您可以通过以下方式获取他们的信息:
npm ERR! npm owner ls db-oracle
npm ERR!上面可能有额外的日志记录输出。
npm ERR!系统达尔文11.3.0
npm ERR!命令“/usr/local/Cellar/node/0.8.11/bin/node”“/ usr / local / bin / npm”“install”“db-oracle”
npm ERR! cwd / usr / InstantClient
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR!代码ELIFECYCLE
npm ERR!
npm ERR!其他日志记录详细信息可在以下位置找到:
npm ERR! /usr/InstantClient/npm-debug.log
npm ERR!不好的代码0