【发布时间】:2017-04-21 03:16:41
【问题描述】:
我正在使用 NodeJS v0.10.38 与 node-oracle Driver "oracle": "^0.3.7" (https://github.com/joeferner/node-oracle) 连接到 oracle 11G 数据库 想到了 OCI 驱动。
export OCI_LIB_DIR=/usr/local/instantclient_11_2/
export OCI_INCLUDE_DIR=/usr/local/instantclient_11_2/sdk/include
export OCI_VERSION=11 # Integer. Optional, defaults to '11'
export NLS_LANG=.UTF8 # Optional, but required to support international characters
export DYLD_LIBRARY_PATH=$OCI_LIB_DIR
一切都安装好了。
运行节点时我只有一个错误:
[Error:
/home/pocho/ZaRaSoFt/node_modules/mongojs/node_modules/mongodb/node_modules/bson /build/Release/bson.node: invalid ELF header]
js-bson: Failed to load c++ bson extension, using pure JS version
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
在执行 oracle 查询时,一些查询随机返回没有结果。 进一步尝试相同的查询可能会返回结果。
【问题讨论】:
-
非常感谢。效果很好!!!!