所以我尝试使用npm为node.js安装bcrypt。当我输入npm install bcrypt
时,会出现这种情况:
主要错误,似乎:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:104
生成日志文件的底部:
90 info install bindings@1.0.0 into /Users/charles/Desktop/Node/pointy/node_modules/bcrypt
91 info installOne bindings@1.0.0
92 info /Users/charles/Desktop/Node/pointy/node_modules/bcrypt/node_modules/bindings unbuild
93 verbose tar unpack /Users/charles/.npm/bindings/1.0.0/package.tgz
94 silly lockFile 2182f8c1-les-bcrypt-node-modules-bindings tar:///Users/charles/Desktop/Node/pointy/node_modules/bcrypt/node_modules/bindings
95 verbose lock tar:///Users/charles/Desktop/Node/pointy/node_modules/bcrypt/node_modules/bindings /Users/charles/.npm/2182f8c1-les-bcrypt-node-modules-bindings.lock
96 silly lockFile 122298a3-s-npm-bindings-1-0-0-package-tgz tar:///Users/charles/.npm/bindings/1.0.0/package.tgz
97 verbose lock tar:///Users/charles/.npm/bindings/1.0.0/package.tgz /Users/charles/.npm/122298a3-s-npm-bindings-1-0-0-package-tgz.lock
98 silly gunzTarPerm modes [ '755', '644' ]
99 silly gunzTarPerm extractEntry package.json
100 silly gunzTarPerm extractEntry README.md
101 silly gunzTarPerm extractEntry bindings.js
102 silly lockFile 2182f8c1-les-bcrypt-node-modules-bindings tar:///Users/charles/Desktop/Node/pointy/node_modules/bcrypt/node_modules/bindings
103 silly lockFile 2182f8c1-les-bcrypt-node-modules-bindings tar:///Users/charles/Desktop/Node/pointy/node_modules/bcrypt/node_modules/bindings
104 silly lockFile 122298a3-s-npm-bindings-1-0-0-package-tgz tar:///Users/charles/.npm/bindings/1.0.0/package.tgz
105 silly lockFile 122298a3-s-npm-bindings-1-0-0-package-tgz tar:///Users/charles/.npm/bindings/1.0.0/package.tgz
106 info preinstall bindings@1.0.0
107 verbose readDependencies using package.json deps
108 verbose readDependencies using package.json deps
109 silly resolved []
110 verbose about to build /Users/charles/Desktop/Node/pointy/node_modules/bcrypt/node_modules/bindings
111 info build /Users/charles/Desktop/Node/pointy/node_modules/bcrypt/node_modules/bindings
112 verbose linkStuff [ false,
112 verbose linkStuff false,
112 verbose linkStuff false,
112 verbose linkStuff '/Users/charles/Desktop/Node/pointy/node_modules/bcrypt/node_modules' ]
113 info linkStuff bindings@1.0.0
114 verbose linkBins bindings@1.0.0
115 verbose linkMans bindings@1.0.0
116 verbose rebuildBundles bindings@1.0.0
117 info install bindings@1.0.0
118 info postinstall bindings@1.0.0
119 verbose about to build /Users/charles/Desktop/Node/pointy/node_modules/bcrypt
120 info build /Users/charles/Desktop/Node/pointy/node_modules/bcrypt
121 verbose linkStuff [ false,
121 verbose linkStuff false,
121 verbose linkStuff false,
121 verbose linkStuff '/Users/charles/Desktop/Node/pointy/node_modules' ]
122 info linkStuff bcrypt@0.7.8
123 verbose linkBins bcrypt@0.7.8
124 verbose linkMans bcrypt@0.7.8
125 verbose rebuildBundles bcrypt@0.7.8
126 verbose rebuildBundles [ 'bindings' ]
127 info install bcrypt@0.7.8
128 verbose unsafe-perm in lifecycle false
129 info bcrypt@0.7.8 Failed to exec install script
130 info /Users/charles/Desktop/Node/pointy/node_modules/bcrypt unbuild
131 info preuninstall bcrypt@0.7.8
132 info uninstall bcrypt@0.7.8
133 verbose true,/Users/charles/Desktop/Node/pointy/node_modules,/Users/charles/Desktop/Node/pointy/node_modules unbuild bcrypt@0.7.8
134 info postuninstall bcrypt@0.7.8
135 error bcrypt@0.7.8 install: `node-gyp rebuild`
135 error Exit status 1
136 error Failed at the bcrypt@0.7.8 install script.
136 error This is most likely a problem with the bcrypt package,
136 error not with npm itself.
136 error Tell the author that this fails on your system:
136 error node-gyp rebuild
136 error You can get their info via:
136 error npm owner ls bcrypt
136 error There is likely additional logging output above.
137 error System Darwin 13.1.0
138 error command "node" "/usr/local/bin/npm" "install" "bcrypt"
139 error cwd /Users/charles/Desktop/Node/pointy
140 error node -v v0.11.12
141 error npm -v 1.4.14
142 error code ELIFECYCLE
143 verbose exit [ 1, true ]
我的节点版本:0.11.12
我的npm版本:1.4.14
我的制作版本:3.81(因为它看起来像是制作错误)
我正在运行Mac OS X Mavericks,并安装了命令行工具。
请告诉我是否还有其他任何可以提供见解的内容;谢谢你看看!