mac npm instalar mysql-libmysqlclient error

Sistema operativo: Mac OS X León 10.7.3 (64 bits)
Xcódigo: 4.3.2
Herramientas de línea de comandos: instalado
mcc:4.2
g ++: 4.2
nodo: 0.6.16
npm:1.1.20
mysql: 5.5.21
Intento instalar npm-modules de mysql-libmysqlclient, instalé con éxito en CentOS 6.2, pero el sistema operativo tiene un problema, esta charla sobre su https://github.com/Sannis/node-mysql-libmysqlclient/issues/107#issuecomment-5485498

localhost:nodejs yangzhaojie$ npm -d install mysql-libmysqlclient
npm info it worked if it ends with ok
npm info using npm@1.1.20
npm info using node@v0.6.16
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 mysql-libmysqlclient@1.3.2
npm info installOne mysql-libmysqlclient@1.3.2
npm info unbuild /Users/yangzhaojie/tech/nodejs/node_modules/mysql-libmysqlclient
npm info preinstall mysql-libmysqlclient@1.3.2
npm info build /Users/yangzhaojie/tech/nodejs/node_modules/mysql-libmysqlclient
npm info linkStuff mysql-libmysqlclient@1.3.2
npm info install mysql-libmysqlclient@1.3.2

> mysql-libmysqlclient@1.3.2 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 mysql-libmysqlclient@1.3.2 Failed to exec install script
npm info unbuild /Users/yangzhaojie/tech/nodejs/node_modules/mysql-libmysqlclient
npm info preuninstall mysql-libmysqlclient@1.3.2
npm info uninstall mysql-libmysqlclient@1.3.2
npm info postuninstall mysql-libmysqlclient@1.3.2

npm ERR! mysql-libmysqlclient@1.3.2 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.2 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 mysql-libmysqlclient@1.3.2 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$

preguntado el 03 de mayo de 12 a las 15:05

pertenece a superuser.com -

2 Respuestas

¿Ejecutaste el

npm -d install mysql-libmysqlclient

como superusuario?

Trata

sudo npm -d install mysql-libmysqlclient

contestado el 03 de mayo de 12 a las 16:05

Intento Sudo npm -d install mysql-libmysqlclient y Sudo npm install mysql-libmysqlclient. el tiene error de todavía. - macjoner

CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings.o llvm-gcc-4.2: Las opciones -E, -S, -save-temps y -M no están permitidas con varias banderas -arch - macjoner

wangmingle@wangmingle01 //
$ npm -d install mysql
npm info it worked if it ends with ok
npm info using npm@1.0.106
npm info using node@v0.4.7
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 / mysql@0.9.6
npm info installOne mysql@0.9.6
npm info unbuild /node_modules/mysql
npm info preinstall mysql@0.9.6
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 hashish@0.0.4
npm info installOne hashish@0.0.4
npm info unbuild /node_modules/mysql/node_modules/hashish
npm info preinstall hashish@0.0.4
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 traverse@0.6.1
npm info installOne traverse@0.6.1
npm info unbuild /node_modules/mysql/node_modules/hashish/node_modules/traverse
npm info preinstall traverse@0.6.1
npm info build /node_modules/mysql/node_modules/hashish/node_modules/traverse
npm info linkStuff traverse@0.6.1
npm info install traverse@0.6.1
npm info postinstall traverse@0.6.1
npm info build /node_modules/mysql/node_modules/hashish
npm info linkStuff hashish@0.0.4
npm info install hashish@0.0.4
npm info postinstall hashish@0.0.4
npm info build /node_modules/mysql
npm info linkStuff mysql@0.9.6
npm info install mysql@0.9.6
npm info postinstall mysql@0.9.6
mysql@0.9.6 /node_modules/mysql
└── hashish@0.0.4
npm info ok

contestado el 23 de mayo de 12 a las 15:05

Lo que esto sugiere es usar el mysql módulo en lugar de mysql-libmysqlclient. (Estoy de acuerdo.) - Nate

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.