簡體   English   中英

npm軟件包構建失敗,如何進行最佳調試?

[英]npm package build failing, how best to debug?

我試圖在Mac OS X上安裝mysql節點程序包。我試圖在本地運行客戶端項目。

我已經安裝了node和npm,它們可以正常工作,其他軟件包也可以正常安裝。 我還編譯/安裝了完整的LAMP堆棧。

當下面的構建失敗時,我看不到任何有用的錯誤消息-只是找不到有關庫的信息。 不知道它找不到什么,我無法修復它。

有什么建議嗎? MySQL已通過標准方式安裝-下載的軟件包,。/ configure,make / install。

$ npm install mysql-libmysqlclient
npm http GET https://registry.npmjs.org/mysql-libmysqlclient
npm http 304 https://registry.npmjs.org/mysql-libmysqlclient

> mysql-libmysqlclient@1.3.3 install /Users/botskonet/node_modules/mysql-libmysqlclient
> node-gyp rebuild

info it worked if it ends with ok 
spawn python [ '/Users/botskonet/.node-gyp/0.6.12/tools/gyp_addon',
  'binding.gyp',
  '-I/Users/botskonet/node_modules/mysql-libmysqlclient/build/config.gypi',
  '-f',
  'make' ]
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings.o
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_connection.o
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_result.o
  CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_statement.o
  SOLINK_MODULE(target) Release/mysql_bindings.node
ld: library not found for -lmysqlclient_r
collect2: ld returned 1 exit status
make: *** [Release/mysql_bindings.node] Error 1
ERR! Error: `make` failed with exit code: 2
    at Array.0 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:176:25)
    at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok

npm ERR! mysql-libmysqlclient@1.3.3 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the mysql-libmysqlclient@1.3.3 install script.
npm ERR! This is most likely a problem with the mysql-libmysqlclient 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 mysql-libmysqlclient
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "mysql-libmysqlclient"
npm ERR! cwd /Users/botskonet/Sites/SportsBuddies
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.15
npm ERR! code ELIFECYCLE
npm ERR! message mysql-libmysqlclient@1.3.3 install: `node-gyp rebuild`
npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/botskonet/Sites/SportsBuddies/npm-debug.log
npm not ok

請參閱自述文件和問題#107中的依賴項部分。 要構建mysql-libmysqlclient,您應該同時安裝libmysqlclient和開發標頭,將MySQL bin目錄的路徑添加到$ PATH,並將MySQL lib目錄的路徑添加到$ DYLD_LIBRARY_PATH。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM