React-Native init项目无法运行

时间:2016-04-10 05:58:37

标签: react-native

在react-native升级后出现问题,现在版本为0.2.0

我收到了很多错误 react-native init HelloWorld

这是错误日志 Installing react-native package from npm... Setting up new React Native app in /Users/jyao/Desktop/HelloWorld bufferutil@1.2.1 install /Users/jyao/Desktop/HelloWorld/node_modules/bufferutil node-gyp rebuild 2016-04-09 22:48:42.628 xcodebuild[6847:69615] Build settings from command line: 2016-04-09 22:48:42.628 xcodebuild[6847:69615] ENABLE_BITCODE = NO 2016-04-09 22:48:42.628 xcodebuild[6847:69615] SWIFT_DISABLE_REQUIRED_ARCLITE = YES 2016-04-09 22:48:42.629 xcodebuild[6847:69615] SWIFT_LINK_OBJC_RUNTIME = YES 2016-04-09 22:48:42.629 xcodebuild[6847:69615] TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault 2016-04-09 22:48:42.629 xcodebuild[6847:69615] XCODE_DEFAULT_TOOLCHAIN_OVERRIDE = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/bufferutil.node ld: library not found for -lgcc_s.10.5 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: * [Release/bufferutil.node] 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:276:23) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Darwin 15.4.0 gyp ERR! command "/usr/local/Cellar/node/5.9.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/jyao/Desktop/HelloWorld/node_modules/bufferutil gyp ERR! node -v v5.9.1 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: node-gyp rebuild npm WARN install:bufferutil@1.2.1 Exit status 1 utf-8-validate@1.2.1 install /Users/jyao/Desktop/HelloWorld/node_modules/utf-8-validate node-gyp rebuild 2016-04-09 22:48:44.191 xcodebuild[6910:69728] Build settings from command line: 2016-04-09 22:48:44.191 xcodebuild[6910:69728] ENABLE_BITCODE = NO 2016-04-09 22:48:44.191 xcodebuild[6910:69728] SWIFT_DISABLE_REQUIRED_ARCLITE = YES 2016-04-09 22:48:44.191 xcodebuild[6910:69728] SWIFT_LINK_OBJC_RUNTIME = YES 2016-04-09 22:48:44.191 xcodebuild[6910:69728] TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault 2016-04-09 22:48:44.191 xcodebuild[6910:69728] XCODE_DEFAULT_TOOLCHAIN_OVERRIDE = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/validation.node ld: library not found for -lgcc_s.10.5 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: * [Release/validation.node] 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:276:23) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Darwin 15.4.0 gyp ERR! command "/usr/local/Cellar/node/5.9.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/jyao/Desktop/HelloWorld/node_modules/utf-8-validate gyp ERR! node -v v5.9.1 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: node-gyp rebuild npm WARN install:utf-8-validate@1.2.1 Exit status 1

任何人都有任何想法?谢谢。

1 个答案:

答案 0 :(得分:0)

看起来你错过了一个图书馆。 ld: library not found for -lgcc_s.10.5

确保安装了包括Xcode CLI在内的所有内容。 如果这样做,请重新启动软件包管理器。