npm oracledb安装失败

时间:2017-10-13 12:26:53

标签: angular npm certificate

我为angular cli设置了node.js和npm,我也能够完成角度教程。

然后我想用这个命令安装npm oracledb模块:npm install oracledb但它失败了。

我已经安装了python 2.7.14并且还设置了我的npmrc配置以使用代理。

proxy=http://user:pass@company.com:8080/
https-proxy=http://user:pass@company.com:8080/
strict-ssl=false
registry=http://registry.npmjs.org/

这是我在安装时得到的结果:

d:\Users\user\Documents\GitHub\angular-start-app>npm install oracledb

> oracledb@1.13.1 install d:\Users\user\Documents\GitHub\angular-start-app\node_modules\oracledb
> node-gyp rebuild


d:\Users\user\Documents\GitHub\angular-start-app\node_modules\oracledb>if not defined npm_config_node_gyp (node "D:\U
sers\user\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
 )  else (node "" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to verify the first certificate
gyp ERR! stack     at Error (native)
gyp ERR! stack     at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
gyp ERR! stack     at emitNone (events.js:86:13)
gyp ERR! stack     at TLSSocket.emit (events.js:185:7)
gyp ERR! stack     at TLSSocket._finishInit (_tls_wrap.js:610:8)
gyp ERR! stack     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\no
de_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd d:\Users\user\Documents\GitHub\angular-start-app\node_modules\oracledb
gyp ERR! node -v v6.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any
"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! oracledb@1.13.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oracledb@1.13.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

由于某些证书,安装失败。我还更新了npm:npm install --global update

有人知道为什么吗?

2 个答案:

答案 0 :(得分:1)

转到http://www.oracle.com/technetwork/topics/winx64soft-089540.html 你需要一个oracle帐户,创建一个是免费的。

下载基本软件包(运行OCI,OCCI和JDBC-OCI应用程序所需的所有文件): http://www.oracle.com/technetwork/topics/winx64soft-089540.html

将其解压缩到一个文件夹:
C:\ ORACLE \ instantclient
将其添加到路径环境变量中。

下载开发和运行时包(sdk)
您将需要这些用于node-gyp的头文件来运行
SDK包 - 用于使用Instant Client开发Oracle应用程序的附加头文件和示例makefile:http://www.oracle.com/technetwork/topics/winx64soft-089540.html

将其解压缩到instantclient文件夹中的sdk文件夹:
C:\ ORACLE \ instantclient \ SDK

创建这些环境变量:
OCI_LIB_DIR C:\ oracle \ instantclient \ sdk \ lib \ msvc
OCI_INC_DIR C:\ oracle \ instantclient \ sdk \ include
如果你不想创建环境变量但我还没有测试过这个方法,那么也可以用bindings.gyp文件来完成

您可能还需要在此处找到Visual Studio 2015 Update 3的Microsoft Visual C ++ Redistributable Packages:https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads 和windows构建像npm install --global --production windows-build-tools

这样的工具

现在正在运行npm install oracledb

答案 1 :(得分:-1)

相关问题