1

MACターミナルでnode jsをoracle dbに接続する必要があります。そのため、インストールのためにリンクhttps://github.com/nearinfinity/node-oracleの手順を試しまし た。インスタントクライアントファイルをオラクルリンクからパス /usr/InstantClient/ のフォルダーにコピーした後、以下のパスを設定しました。

$ export OCI_INCLUDE_DIR=/usr/InstantClient/sdk/include $ export OCI_LIB_DIR=/usr/InstantClient/ $ export LD_LIBRARY_PATH=/usr/InstantClient/

しかし、 Error: At least one file failed to compile のようなエラーが発生します。

パスまたは環境変数の設定を間違えていませんか? MAC端末のノードで使用するOracleモジュールをインストールする手順を教えてもらえますか? ありがとう

EDIT:私が得るエラーリストは次のとおりnpm install db-oracleです:

unameits-Mac-mini:InstantClient vinod$ npm install db-oracle
npm http GET https://registry.npmjs.org/db-oracle
npm http 304 https://registry.npmjs.org/db-oracle

> db-oracle@0.2.3 install /usr/InstantClient/node_modules/db-oracle
> node-waf configure build

Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local/Cellar/node/0.8.11 
Checking for header occi.h               : Missing include files for OCI 
/usr/InstantClient/node_modules/db-oracle/wscript:42: error: the configuration failed (see '/usr/InstantClient/node_modules/db-oracle/build/config.log')
> db-oracle@0.2.3 preuninstall /usr/InstantClient/node_modules/db-oracle
> rm -rf build/*
npm ERR! db-oracle@0.2.3 install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR! 
npm ERR! Failed at the db-oracle@0.2.3 install script.
npm ERR! This is most likely a problem with the db-oracle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls db-oracle
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.3.0

npm ERR! command "/usr/local/Cellar/node/0.8.11/bin/node" "/usr/local/bin/npm" "install" "db-oracle"

npm ERR! cwd /usr/InstantClient
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/InstantClient/npm-debug.log

npm ERR! not ok code 0

npm install db-oracle で得られるエラー リストは次のとおりです。

unameits-Mac-mini:InstantClient vinod$ npm install db-oracle npm http GET https://registry.npmjs.org/db-oracle npm http 304 https://registry.npmjs.org/db-oracle

db-oracle@0.2.3 install /usr/InstantClient/node_modules/db-oracle node-waf configure build

プログラム g++ または c++ のチェック: /usr/bin/g++

プログラム cpp をチェックしています: /usr/bin/cpp

プログラム ar をチェックしています: /usr/bin/ar

プログラム ranlib をチェックしています: /usr/bin/ranlib

g++ のチェック: わかりました

ノード パスをチェックしています: 見つかりません

ノードプレフィックスの確認: ok /usr/local/Cellar/node/0.8.11

ヘッダー occi.h をチェックしています: OCI のインクルード ファイルがありません

/usr/InstantClient/node_modules/db-oracle/wscript:42: エラー: 構成に失敗しました (「/usr/InstantClient/node_modules/db-oracle/build/config.log」を参照)

db-oracle@0.2.3 preuninstall /usr/InstantClient/node_modules/db-oracle rm -rf build/*

npm エラー! db-oracle@0.2.3 インストール:node-waf configure build

npm エラー! sh "-c" "node-waf configure build"1で失敗しました

npm エラー!

npm エラー! db-oracle@0.2.3 インストール スクリプトで失敗しました。

npm エラー! これはおそらく db-oracle パッケージの問題です。

npm エラー! npm自体ではありません。

npm エラー! あなたのシステムではこれが失敗することを作者に伝えてください:

npm エラー! node-waf 構成ビルド

npm エラー! 次の方法で情報を取得できます。

npm エラー! npm 所有者 ls db-oracle

npm エラー! 上記の追加のログ出力がある可能性があります。

npm エラー! システム ダーウィン 11.3.0

npm エラー! コマンド "/usr/local/Cellar/node/0.8.11/bin/node" "/usr/local/bin/npm" "install" "db-oracle"

npm エラー! cwd /usr/InstantClient

npm エラー! ノード -v v0.8.11

npm エラー! npm -v 1.1.62

npm エラー! コード ELIFECYCLE

npm エラー!

npm エラー! 追加のログの詳細は、次の場所にあります。

npm エラー! /usr/InstantClient/npm-debug.log

npm エラー! 正しくないコード 0

4

0 に答える 0