linux - 在 Red Hat Enterprise Linux Server 6.4 Santiago 上安装 node-oracle

标签 linux oracle node.js node-oracle

我一直在尝试在 (Red Hat Enterprise Linux Server release 6.4 (Santiago) ) 服务器上安装 node-oracle。但是,我没有成功。 我已经仔细按照网页上的说明进行操作,但是当我运行“npm install oracle”时,出现以下错误。 我将在下面粘贴执行“npm install oracle”的全部结果。

npm http GET https://registry.npmjs.org/oracle
npm http 304 https://registry.npmjs.org/oracle


oracle@0.3.4 install /home/oracle/node_modules/oracle
node-gyp rebuild

make: Entering directory /home/oracle/node_modules/oracle/build'
 CXX(target) Release/obj.target/oracle_bindings/src/connection.o
 CXX(target) Release/obj.target/oracle_bindings/src/oracle_bindings.o
 CXX(target) Release/obj.target/oracle_bindings/src/executeBaton.o
 CXX(target) Release/obj.target/oracle_bindings/src/outParam.o
 SOLINK_MODULE(target) Release/obj.target/oracle_bindings.node
 /usr/bin/ld: cannot find -locci
 collect2: ld returned 1 exit status
 make: *** [Release/obj.target/oracle_bindings.node] Error 1
 make: Leaving directory/home/oracle/node_modules/oracle/build'
 gyp ERR! build error
 gyp ERR! stack Error: make failed with exit code: 2
 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23)
 gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
 gyp ERR! stack at Process.ChildProcess.handle.onexit (childprocess.js:789:12)
 gyp ERR! System Linux 2.6.32-358.el6.x86_64
 gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
 gyp ERR! cwd /home/oracle/node_modules/oracle
 gyp ERR! node -v v0.10.18
 gyp ERR! node-gyp -v v0.10.6
 gyp ERR! not ok
 npm ERR! weird error 1
 npm ERR! not ok code 0

如果有人能提供帮助,我将不胜感激。 尝试了下载源码在服务器上重新编译等多种方式,还是出现了类似的错误。

干杯, 阿卜杜拉

最佳答案

从报错来看,好像是你没有设置OCI_INCLUDE_DIR/OCI_LIB_DIR环境变量

export OCI_HOME=<directory of Oracle instant client>
export OCI_LIB_DIR=$OCI_HOME
export OCI_INCLUDE_DIR=$OCI_HOME/sdk/include
export OCI_VERSION=<the instant client major version number> # Optional. Default is 11.

关于linux - 在 Red Hat Enterprise Linux Server 6.4 Santiago 上安装 node-oracle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19429551/

相关文章:

linux - 如何将核心文件 TEXT 页转储为反汇编文本文件?

c - 如何在多线程程序中防止SIGPIPE?

oracle - 将select语句的结果插入到Oracle存储过程中的另一个表中

oracle - Oracle中如何获取同义词的列列表

mysql - 提高 pentaho 表输入步骤性能

javascript - 使用 Socket.IO 发送到房间/ channel 中的用户子集

jquery - 添加到列表并通过 html 表单和 jquery 提交的问题

c - 无法处理的 POSIX 信号的返回码

javascript - 在 nodeJs 中,有没有一种方法可以在不使用数组大小​​的情况下循环遍历数组?

c - Linux 内核 0.11 中的进程 0 堆栈