2017-01-16 6 views
1

​​私のMacにnpmを使用してドライバをインストールしようとしています。私は与えられたlinkに記載されているすべてのステップに従ってきました。私は​​パッケージをインストールしようとしていた場合:npm install oracledbを私は次のエラーに

> [email protected] install /opt/oracle/instantclient/node_modules/oracledb 
> node-gyp rebuild 
node-oracledb ERR! Error: Cannot find $OCI_LIB_DIR/libclntsh.dylib 
node-oracledb ERR! Error: Do you need to run 'cd $OCI_LIB_DIR && ln -s libclntsh.dylib.* libclntsh.dylib'? 
node-oracledb ERR! Error: See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx 
gyp: Call to 'INSTURL="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx"; ERR="node-oracledb ERR! Error:"; if [ -z $OCI_LIB_DIR ]; then if [ -f /opt/oracle/instantclient/libclntsh.dylib ]; then echo "/opt/oracle/instantclient/"; else echo "$ERR Cannot find /opt/oracle/instantclient/libclntsh.dylib" >&2; echo "$ERR Do you need to run 'cd /opt/oracle/instantclient && ln -s libclntsh.dylib.* libclntsh.dylib'?" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; else if [ -f "$OCI_LIB_DIR/libclntsh.dylib" ]; then echo $OCI_LIB_DIR; else echo "$ERR Cannot find \$OCI_LIB_DIR/libclntsh.dylib" >&2; echo "$ERR Do you need to run 'cd \$OCI_LIB_DIR && ln -s libclntsh.dylib.* libclntsh.dylib'?" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; fi;' returned exit status 0 while in binding.gyp. 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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:191:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 
gyp ERR! System Darwin 16.1.0 
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /opt/oracle/instantclient/node_modules/oracledb 
gyp ERR! node -v v7.0.0 
gyp ERR! node-gyp -v v3.4.0 
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/opt/oracle/instantclient/package.json' 
npm WARN instantclient No description 
npm WARN instantclient No repository field. 
npm WARN instantclient No README data 
npm WARN instantclient No license field. 
npm ERR! Darwin 16.1.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "oracledb" 
npm ERR! node v7.0.0 
npm ERR! npm v3.10.8 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, 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 information on how to open an issue for this project with: 
npm ERR!  npm bugs oracledb 
npm ERR! Or if that isn't available, 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!  /opt/oracle/instantclient/npm-debug.log 

を取得しています私のノードのバージョンがv7.0.0で、私のNPMのバージョンがv3.10.8です。誰かが私に間違っていることを教えてもらえますか?

答えて

0

install docをお読みください。要約:

  1. は、あなたが遅れている場合のInstant Client 12cで
  2. Instant Clientのディレクトリへ
  3. 設定OCI_LIB_DIRとOCI_INC_DIR
  4. 設定HTTP_PROXYを使用SYMリンクを作成Instant Clientの
  5. インストールXCodeの
  6. をインストールします。ファイアウォール
  7. 実行npm install oracledb sudoを使用して、あなたはおそらくsudo -E npm install oracledb
0123を実行する必要がある場合

問題を診断するには、試した手順のログを表示してください。

+0

node-oracledb 2.xでは、Instant Clientの「Basic」または「Basic Light」パッケージを〜/ libに置く必要があります。 Instant Client SDKは必要ありません。 OCI_LIB_DIRまたはOCI_INC_DIRは必要ありません。最近の「npm」バージョンでは、https_proxyを設定する必要があります。 –

関連する問題