npm安装oracle数据库失败
npm OracleDB installation failed?
我尝试使用nodejs连接Oracle DB,下面是示例代码片段。
oracledb.getConnection(
{
user : "hr",
password : "welcome",
connectString : "localhost/XE"
},(function(err){
if(!err) {
console.log("Database is connected ... 'n'n");
} else {
console.log(util.inspect(conString,false,null ));
console.log("Error connecting database ... 'n'n"+client);
}
}));
我得到下面的错误"错误:找不到模块'oracledb'",累了使用npm install oracledb
安装Oracle模块,但未能安装:下面是我得到的错误
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the
HON env variable.
gyp ERR! stack at failNoPython (C:'Program Files'nodejs'node_modules'npm'
e_modules'node-gyp'lib'configure.js:114:14)
gyp ERR! stack at C:'Program Files'nodejs'node_modules'npm'node_modules'n
-gyp'lib'configure.js:69:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:''Program Files''nodejs''node_modules''npm''node_m
les''node-gyp''bin''node-gyp.js" "rebuild"
gyp ERR! cwd C:'UOC_UCAATM'script_new'node_modules'oracledb
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
谁能告诉我如何解决这个问题?
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:''Program Files''nodejs''''node.exe" "C:''Program Files''nod
''node_modules''npm''bin''npm-cli.js" "install" "oracledb"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! oracledb@1.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oracledb@1.0.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the oracledb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls oracledb
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:'UOC_UCAATM'script_new'npm-debug.log
我遇到了类似的错误,我重新安装了python 2.7来解决它。必须是64位,因为我运行的是64位操作系统和Oracle XE。
https://www.python.org/downloads/请确保在安装时将其添加到您的路径中。
如有疑问,请阅读手册:https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instwin正如@x4rf41所说,您缺少一个先决条件。
相关文章:
- 将输入字段中的文本提交到我的数据库,同时将其添加到我的列表中
- 如何通过php页面将数据库值检索到jquery自动完成框中
- 使用javascript从数据库中添加表
- 通过CSV文件上载更新数据库表
- 平均值:无法将数据更新到数据库
- 如何使用 Angular JS 将数据保存在数据库中
- Rails-JQueryUIAutcomplete和AJAX不工作,可以't连接到数据库
- 当json解析空响应时,Whatwg-Fetch失败,我该如何防止它
- 在谷歌地图上绘制位置数据库
- indexedDB创建数据库并添加内容执行失败'交易'在'IDBDatabase'
- 错误“由于与数据库无关的原因,操作失败..“,在 Firefox 中使用 indexedDB 时
- JS开放数据库有时会失败
- 从MySQL数据库到带有XML报表的PHP的法语字符失败
- JQuery从数据库自动完成表单失败
- 付款处理成功,但数据库更新失败
- jQuery -数据库访问失败后的更新按钮图标
- npm安装oracle数据库失败
- AJAX请求保存到数据库,但警报失败
- 从web应用程序到数据库的发布失败
- 从数据库检索后解码base64图像失败