2013-10-17 72 views
1

我一直在嘗試在(Red Hat Enterprise Linux Server 6.4版(聖地亞哥))服務器上安裝node-oracle。但是,我沒有成功。 我仔細地按照網頁上的說明,但是當我運行「npm install oracle」時,出現以下錯誤。 我會在下面粘貼「npm install oracle」的執行結果。在紅帽企業Linux服務器6.4版上安裝node-oracle聖地亞哥

npm http GET https://registry.npmjs.org/oracle 
npm http 304 https://registry.npmjs.org/oracle 


[email protected] install /home/oracle/node_modules/oracle 
node-gyp rebuild 

make: Entering directory /home/oracle/node_modules/oracle/build' 
CXX(target) Release/obj.target/oracle_bindings/src/connection.o 
CXX(target) Release/obj.target/oracle_bindings/src/oracle_bindings.o 
CXX(target) Release/obj.target/oracle_bindings/src/executeBaton.o 
CXX(target) Release/obj.target/oracle_bindings/src/outParam.o 
SOLINK_MODULE(target) Release/obj.target/oracle_bindings.node 
/usr/bin/ld: cannot find -locci 
collect2: ld returned 1 exit status 
make: *** [Release/obj.target/oracle_bindings.node] Error 1 
make: Leaving directory/home/oracle/node_modules/oracle/build' 
gyp ERR! build error 
gyp ERR! stack Error: make failed with exit code: 2 
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23) 
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack at Process.ChildProcess.handle.onexit (childprocess.js:789:12) 
gyp ERR! System Linux 2.6.32-358.el6.x86_64 
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/oracle/node_modules/oracle 
gyp ERR! node -v v0.10.18 
gyp ERR! node-gyp -v v0.10.6 
gyp ERR! not ok 
npm ERR! weird error 1 
npm ERR! not ok code 0 

如果有人能幫到這個,我將不勝感激。 我嘗試了幾種方法,例如下載源代碼並在服務器上重新編譯它,但我又遇到了類似的錯誤。

乾杯, 阿卜杜拉

回答

1

從錯誤,看來你沒有設置OCI_INCLUDE_DIR/OCI_LIB_DIR ENV變量

export OCI_HOME=<directory of Oracle instant client> 
export OCI_LIB_DIR=$OCI_HOME 
export OCI_INCLUDE_DIR=$OCI_HOME/sdk/include 
export OCI_VERSION=<the instant client major version number> # Optional. Default is 11. 
0

我有同樣的問題,只是我使用Ubuntu 10.04和我的安裝程序錯過lnnz11而不是locci。我設置了環境變量,並且pre_install_check.sh回覆我「一切都看起來很華麗」,但它不起作用。

之後,我下載了instantclient版本11而不是12,並重新定義了環境變量,現在它正在工作。

相關問題