无法在Mac上安装PhoneGap

时间:2014-06-20 12:38:39

标签: node.js macos git cordova

我已在Windows上成功安装了Phonegap,但现在当我在Mac上执行此操作时,我一直收到此错误:

[~]$ sudo npm install -g phonegap
npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/apache/cordova-lib.git) 
npm ERR! git clone git://github.com/apache/cordova-lib.git dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk
npm ERR! git clone git://github.com/apache/cordova-lib.git   Referenced from: /usr/local/git/bin/git
npm ERR! git clone git://github.com/apache/cordova-lib.git   Expected in: /usr/lib/libSystem.B.dylib
npm ERR! git clone git://github.com/apache/cordova-lib.git 
npm ERR! git clone git://github.com/apache/cordova-lib.git dyld: Symbol not found: ___strlcpy_chk
npm ERR! git clone git://github.com/apache/cordova-lib.git   Referenced from: /usr/local/git/bin/git
npm ERR! git clone git://github.com/apache/cordova-lib.git   Expected in: /usr/lib/libSystem.B.dylib
npm ERR! Error: Command failed: dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk
npm ERR!   Referenced from: /usr/local/git/bin/git
npm ERR!   Expected in: /usr/lib/libSystem.B.dylib
npm ERR! 
npm ERR! dyld: Symbol not found: ___strlcpy_chk
npm ERR!   Referenced from: /usr/local/git/bin/git
npm ERR!   Expected in: /usr/lib/libSystem.B.dylib
npm ERR! 
npm ERR! 
npm ERR!     at ChildProcess.exithandler (child_process.js:647:15)
npm ERR!     at ChildProcess.emit (events.js:98:17)
npm ERR!     at maybeClose (child_process.js:755:16)
npm ERR!     at Socket.<anonymous> (child_process.js:968:11)
npm ERR!     at Socket.emit (events.js:95:17)
npm ERR!     at Pipe.close (net.js:465:12)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "phonegap"
npm ERR! cwd /Users/andy
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/andy/npm-debug.log
npm ERR! not ok code 0

任何想法如何解决这个问题?我没有太多使用Mac的经验,所以你必须更详细地解释我的解决方案。

1 个答案:

答案 0 :(得分:0)

修复了:sudo chown -R 'whoam' ~/.npmnpm-throws-error-without-sudo

相关问题