【发布时间】:2012-03-12 12:33:02
【问题描述】:
当我尝试在我的 ubuntu 机器上安装 oracle npm 模块时收到以下错误消息:
npm install oracle
npm http GET https://registry.npmjs.org/oracle
npm http 304 https://registry.npmjs.org/oracle
> oracle@0.1.2 install /home/luc/node_modules/oracle
> node-waf configure build
Setting srcdir to : /home/luc/node_modules/oracle
Setting blddir to : /home/luc/node_modules/oracle/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 : ok /home/luc/.nave/installed/0.6.12/lib/node
Checking for node prefix : ok /home/luc/.nave/installed/0.6.12
Checking for header occi.h : Missing include files for OCI
/home/luc/node_modules/oracle/wscript:28: error: the configuration failed (see '/home/luc/node_modules/oracle/build/config.log')
npm ERR! error installing oracle@0.1.2
npm ERR! oracle@0.1.2 install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the oracle@0.1.2 install script.
npm ERR! This is most likely a problem with the 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 oracle
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.38-8-server
npm ERR! command "node" "/home/luc/.nave/installed/0.6.12/bin/npm" "install" "oracle"
npm ERR! cwd /home/luc
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message oracle@0.1.2 install: `node-waf configure build`
npm ERR! message `sh "-c" "node-waf configure build"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/luc/npm-debug.log
npm not ok
我的环境变量似乎设置正确:
export ORACLE_HOME=/home/luc/instantclient_11_2/
export LD_LIBRARY_PATH=$ORACLE_HOME
export DYLD_LIBRARY_PATH=$ORACLE_HOME
还有符号链接:
libclntsh.so -> libclntsh.so.11.1
libocci.so -> libocci.so.11.1
我的配置中是否缺少某些内容?
【问题讨论】:
-
我猜你缺少 OCI 的包含文件。
-
@andrew-cooke,我的错.... export OCI_INCLUDE_DIR=$ORACLE_HOME/sdk/include/ 和 export OCI_LIB_DIR=$ORACLE_HOME 修复了这个问题。您能否将您的评论作为答案?