windows7 64位下安装 mysql-libmysqlclient 报错,求解!
发布于 2年前 作者 phenixsoul 3048 次浏览

E:\nodejs>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.5.1 install E:\nodejs\node_modules\mysql-libmysqlclient

node-gyp rebuild

E:\nodejs\node_modules\mysql-libmysqlclient>node “E:\nodejs\node_modules\npm\bin \node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild gyp ERR! configure error gyp ERR! stack Error: Can’t find Python executable "python", you can set the PYT HON env variable. gyp ERR! stack at failNoPython (E:\nodejs\node_modules\npm\node_modules\node -gyp\lib\configure.js:109:14) gyp ERR! stack at E:\nodejs\node_modules\npm\node_modules\node-gyp\lib\confi gure.js:78:11 gyp ERR! stack at Object.oncomplete (fs.js:297:15) gyp ERR! System Windows_NT 6.1.7600 gyp ERR! command “node” “E:\nodejs\node_modules\npm\node_modules\node-gyp\ bin\node-gyp.js” “rebuild” gyp ERR! cwd E:\nodejs\node_modules\mysql-libmysqlclient gyp ERR! node -v v0.8.14 gyp ERR! node-gyp -v v0.7.1 gyp ERR! not ok npm ERR! mysql-libmysqlclient@1.5.1 install: node-gyp rebuild npm ERR! cmd "/c" "node-gyp rebuild" failed with 1 npm ERR! npm ERR! Failed at the mysql-libmysqlclient@1.5.1 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! System Windows_NT 6.1.7600 npm ERR! command “E:\nodejs\\node.exe” “E:\nodejs\node_modules\npm\bin\n pm-cli.js” “install” “mysql-libmysqlclient” npm ERR! cwd E:\nodejs npm ERR! node -v v0.8.14 npm ERR! npm -v 1.1.65 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! E:\nodejs\npm-debug.log npm ERR! not ok code 0

5 回复

里面写的很清楚,你机器没装Python或者没配到path里

我按照错误提示,安装了python,环境变量也写了,可还是错误,我怀疑是http响应304的缘故

@phenixsoul 304表示你已经把包下载下来了。错误里面有说明,你可以贴出了一起看一下。

又变成这样了。。。。

E:\nodejs>npm install mysql-libmysqlclient npm http GET https://registry.npmjs.org/mysql-libmysqlclient npm http 304 https://registry.npmjs.org/mysql-libmysqlclient

[email protected] install E:\nodejs\node_modules\mysql-libmysqlclient

node-gyp rebuild

E:\nodejs\node_modules\mysql-libmysqlclient>node “E:\nodejs\node_modules\npm\bin \node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild gyp ERR! configure error gyp ERR! stack Error: Command failed: CreateProcessW: �ܾ����ʡ� gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:540:15) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17) gyp ERR! stack at maybeClose (child_process.js:638:16) gyp ERR! stack at Socket.ChildProcess.spawn.stdin (child_process.js:815:11) gyp ERR! stack at Socket.EventEmitter.emit (events.js:96:17) gyp ERR! stack at Socket._destroy.destroyed (net.js:357:10) gyp ERR! stack at process.startup.processNextTick.process._tickCallback (nod e.js:244:9) gyp ERR! System Windows_NT 6.1.7600 gyp ERR! command “node” “E:\nodejs\node_modules\npm\node_modules\node-gyp\ bin\node-gyp.js” “rebuild” gyp ERR! cwd E:\nodejs\node_modules\mysql-libmysqlclient gyp ERR! node -v v0.8.14 gyp ERR! node-gyp -v v0.7.1 gyp ERR! not ok npm ERR! [email protected] install: node-gyp rebuild npm ERR! cmd "/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! System Windows_NT 6.1.7600 npm ERR! command “E:\nodejs\\node.exe” “E:\nodejs\node_modules\npm\bin\n pm-cli.js” “install” “mysql-libmysqlclient” npm ERR! cwd E:\nodejs npm ERR! node -v v0.8.14 npm ERR! npm -v 1.1.65 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! E:\nodejs\npm-debug.log

为什么还需要安装Python才行

回到顶部