1

我需要在 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 configure build

检查程序 g++ 或 c++:/usr/bin/g++

检查程序 cpp:/usr/bin/cpp

检查程序 ar:/usr/bin/ar

检查程序ranlib:/usr/bin/ranlib

检查 g++:好的

检查节点路径:未找到

检查节点前缀: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 错误!db-oracle@0.2.3 安装:node-waf configure build

npm 错误!sh "-c" "node-waf configure build"失败 1

npm 错误!

npm 错误!db-oracle@0.2.3 安装脚本失败。

npm 错误!这很可能是 db-oracle 软件包的问题,

npm 错误!不是 npm 本身。

npm 错误!告诉作者这在您的系统上失败:

npm 错误!node-waf 配置构建

npm 错误!您可以通过以下方式获取他们的信息:

npm 错误!npm 所有者 ls db-oracle

npm 错误!上面可能有额外的日志输出。

npm 错误!系统达尔文 11.3.0

npm 错误!命令“/usr/local/Cellar/node/0.8.11/bin/node”“/usr/local/bin/npm”“安装”“db-oracle”

npm 错误!cwd /usr/InstantClient

npm 错误!节点-v v0.8.11

npm 错误!npm -v 1.1.62

npm 错误!代码生命周期

npm 错误!

npm 错误!可以在以下位置找到其他日志记录详细信息:

npm 错误!/usr/InstantClient/npm-debug.log

npm 错误!不好的代码 0

4

0 回答 0