0

在 bluemix 上执行部署时,尝试使用oracledb时发生错误。跟随错误:

node-oracledb ERR! Error: Cannot find Oracle library libclntsh.so
node-oracledb ERR! Error: See https://github.com/oracle/node-   oracledb/blob/master/INSTALL.md

gyp: Call to 'INSTURL="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md"; ERR="node-oracledb ERR! Error:"; if [ -z    $OCI_LIB_DIR ]; then OCI_LIB_DIR=`ls -d    /usr/lib/oracle/*/client*/lib/libclntsh.* 2> /dev/null | tail -1 | sed -e 's#/libclntsh[^/]*##'`; if [ -z $OCI_LIB_DIR ]; then if [ -z    "$ORACLE_HOME" ]; then if [ -f /opt/oracle/instantclient/libclntsh.so ];       then echo "/opt/oracle/instantclient/"; else echo "$ERR Cannot find Oracle    library libclntsh.so" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi;    else if [ -f "$ORACLE_HOME/lib/libclntsh.so" ]; then echo    $ORACLE_HOME/lib; else echo "$ERR Cannot find    \$ORACLE_HOME/lib/libclntsh.so" >&2; echo "$ERR See $INSTURL" >&2; echo ""    >&2; fi; fi; else if [ -f "$OCI_LIB_DIR/libclntsh.so" ]; then echo    $OCI_LIB_DIR; else echo "$ERR Cannot find \$OCI_LIB_DIR/libclntsh.so" >&2;    echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; fi; else if [ -f    "$OCI_LIB_DIR/libclntsh.so" ]; then echo $OCI_LIB_DIR; else echo "$ERR    Cannot find \$OCI_LIB_DIR/libclntsh.so" >&2; echo "$ERR See $INSTURL" >&2;    echo "" >&2; fi; fi;' returned exit status 0. while trying to load    binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/opt/IBM/node-v4.2.2-linux-x64/lib/node_modules/npm/node_modules/node-   gyp/lib/configure.js:472:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit    
(internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-107-generic
gyp ERR! command "/opt/IBM/node-v4.2.2-linux-x64/bin/node" "/opt/IBM/node-v4.2.2-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pipeline/xxx-7708-xxx-9f5a-xxx/node_modules/oracledb
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2    or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

会是什么呢?万一,Bluemix 不支持 oracledb?

4

1 回答 1

0

GitHub 安装说明

安装需要 Oracle 11.2 或 12c 客户端库。

这就是安装node-oracledb包失败的原因。

显然,Bluemix 不支持它。

下面来自 Bluemix的关于相关主题的评论。

Bluemix 中没有Oracle 数据库服务。我们所拥有的是 2 个 MySQL 服务。如果您正在寻找对本地 Oracle 数据库的访问权限,云集成插件将为您提供。

于 2017-03-16T03:33:24.377 回答