2012-05-03 84 views
0

操作系統:Mac OS X獅子10.7.3(64位)
Xcode中:4.3.2
命令行工具:安裝
GCC:4.2
克++:4.2
節點: 0.6.16
NPM:1.1.20
MySQL的:21年5月5日
我嘗試安裝mysql-的libmysqlclient的NPM模塊,我安裝在CentOS 6.2的成功,但OS有問題,該說說它的https://github.com/Sannis/node-mysql-libmysqlclient/issues/107#issuecomment-5485498MAC NPM安裝mysql-的libmysqlclient錯誤

localhost:nodejs yangzhaojie$ npm -d install mysql-libmysqlclient 
npm info it worked if it ends with ok 
npm info using [email protected] 
npm info using [email protected] 
npm http GET https://registry.npmjs.org/mysql-libmysqlclient 
npm http 200 https://registry.npmjs.org/mysql-libmysqlclient 
npm http GET https://registry.npmjs.org/mysql-libmysqlclient/-/mysql-libmysqlclient-1.3.2.tgz 
npm http 200 https://registry.npmjs.org/mysql-libmysqlclient/-/mysql-libmysqlclient-1.3.2.tgz 
npm info shasum 8ae08483d5e37fcb5a37e6e459c7eda073ff486b 
npm info shasum /var/folders/bc/gxqr_gj55lg1x77dgcym3mmc0000gn/T/npm-1336054761009/1336054761009-0.6183159125503153/tmp.tgz 
npm info shasum 2e0901d4c28613050078931d2930b7f98a9353d0 
npm info shasum /Users/yangzhaojie/.npm/mysql-libmysqlclient/1.3.2/package.tgz 
npm info into /Users/yangzhaojie/tech/nodejs [email protected] 
npm info installOne [email protected] 
npm info unbuild /Users/yangzhaojie/tech/nodejs/node_modules/mysql-libmysqlclient 
npm info preinstall [email protected] 
npm info build /Users/yangzhaojie/tech/nodejs/node_modules/mysql-libmysqlclient 
npm info linkStuff [email protected] 
npm info install [email protected] 

> [email protected] install /Users/yangzhaojie/tech/nodejs/node_modules/mysql-libmysqlclient 
> node-gyp rebuild 

info it worked if it ends with ok 
spawn python [ '/Users/yangzhaojie/.node-gyp/0.6.16/tools/gyp_addon', 
    'binding.gyp', 
    '-I/Users/yangzhaojie/tech/nodejs/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 
../src/mysql_bindings_connection.cc:1322:22: error: variable length array of non-POD element type 'Local<v8::Value>' 
    Local<Value> argv[argc]; 
        ^
../src/mysql_bindings_connection.cc:1627:22: error: variable length array of non-POD element type 'Local<v8::Value>' 
    Local<Value> argv[argc]; 
        ^
../src/mysql_bindings_connection.cc:1691:22: error: variable length array of non-POD element type 'Local<v8::Value>' 
    Local<Value> argv[argc]; 
        ^
3 errors generated. 
make: *** [Release/obj.target/mysql_bindings/src/mysql_bindings_connection.o] Error 1 
ERR! Error: `make` failed with exit code: 2 
    at ChildProcess.onExit (/Users/yangzhaojie/app/node-0.6.16/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23) 
    at ChildProcess.emit (events.js:70:17) 
    at maybeExit (child_process.js:362:16) 
    at Process.onexit (child_process.js:398:5) 
ERR! not ok 
npm info [email protected] Failed to exec install script 
npm info unbuild /Users/yangzhaojie/tech/nodejs/node_modules/mysql-libmysqlclient 
npm info preuninstall [email protected] 
npm info uninstall [email protected] 
npm info postuninstall [email protected] 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] 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" "/Users/yangzhaojie/app/node-0.6.16/bin/npm" "-d" "install" "mysql-libmysqlclient" 
npm ERR! cwd /Users/yangzhaojie/tech/nodejs 
npm ERR! node -v v0.6.16 
npm ERR! npm -v 1.1.20 
npm ERR! code ELIFECYCLE 
npm ERR! message [email protected] 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/yangzhaojie/tech/nodejs/npm-debug.log 
npm not ok 
localhost:nodejs yangzhaojie$ 
+0

屬於superuser.com – Raptor

回答

0

你執行

npm -d install mysql-libmysqlclient 

超級用戶身份?

嘗試

sudo npm -d install mysql-libmysqlclient 
+0

我嘗試須藤NPM -d安裝mysql-的libmysqlclient和須藤NPM安裝mysql-的libmysqlclient。仍然有錯誤。 – mackjoner

+0

CXX(target)Release/obj.target/mysql_bindings/src/mysql_bindings.o llvm-gcc-4.2:-E,-S,-save-temps和-M選項不允許有多個標記 – mackjoner

0
[email protected] // 
$ npm -d install mysql 
npm info it worked if it ends with ok 
npm info using [email protected] 
npm info using [email protected] 
npm info addNamed [ 'mysql', '' ] 
npm info fetch http:/registry.npmjs.org/mysql/-/mysql-0.9.6.tgz 
npm info shasum 95a3a9f41f94353c6460664b5867997e88b625bc 
npm info shasum /tmp/npm-1337774338269/1337774338269-0.257753849029541/tmp.tgz 
npm info shasum 7f9fab740989daba691215768ada0d8c36dd477f 
npm info shasum /home/wangmingle/.npm/mysql/0.9.6/package.tgz 
npm info into/[email protected] 
npm info installOne [email protected] 
npm info unbuild /node_modules/mysql 
npm info preinstall [email protected] 
npm info addNamed [ 'hashish', '0.0.4' ] 
npm info fetch http:/registry.npmjs.org/hashish/-/hashish-0.0.4.tgz 
npm info shasum 6d60bc6ffaf711b6afd60e426d077988014e6554 
npm info shasum /tmp/npm-1337774338269/1337774360833-0.05971289472654462/tmp.tgz 
npm info shasum 08ecd695975ee21ddb4b6f3e76e288dec99b2617 
npm info shasum /home/wangmingle/.npm/hashish/0.0.4/package.tgz 
npm info into /node_modules/mysql [email protected] 
npm info installOne [email protected] 
npm info unbuild /node_modules/mysql/node_modules/hashish 
npm info preinstall [email protected] 
npm info addNamed [ 'traverse', '>=0.2.4' ] 
npm info fetch http:/registry.npmjs.org/traverse/-/traverse-0.6.1.tgz 
npm info shasum abba3297d8cd608796189e9bbcda6c7fc6b7a4f9 
npm info shasum /tmp/npm-1337774338269/1337774387669-0.5074084696825594/tmp.tgz 
npm info shasum 636da24fb8f438ec6b1ca39a6a4f07e130e9aea0 
npm info shasum /home/wangmingle/.npm/traverse/0.6.1/package.tgz 
npm info into /node_modules/mysql/node_modules/hashish [email protected] 
npm info installOne [email protected] 
npm info unbuild /node_modules/mysql/node_modules/hashish/node_modules/traverse 
npm info preinstall [email protected] 
npm info build /node_modules/mysql/node_modules/hashish/node_modules/traverse 
npm info linkStuff [email protected] 
npm info install [email protected] 
npm info postinstall [email protected] 
npm info build /node_modules/mysql/node_modules/hashish 
npm info linkStuff [email protected] 
npm info install [email protected] 
npm info postinstall [email protected] 
npm info build /node_modules/mysql 
npm info linkStuff [email protected] 
npm info install [email protected] 
npm info postinstall [email protected] 
[email protected] /node_modules/mysql 
└── [email protected] 
npm info ok 
+0

這是什麼建議使用「mysql」模塊而不是「mysql-libmysqlclient」。 (我同意。) – Nate