我正在尝试在我的Mac上安装cocoapods,我收到以下错误:
Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. /Users/aleix/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb creating Makefile make "DESTDIR=" compiling generator.c make: I.: No such file or directory make: [generator.o] Error 1 (ignored) linking shared-object json/ext/generator.bundle make: dynamic: No such file or directory make: [generator.bundle] Error 1 (ignored) make "DESTDIR=" install compiling generator.c make: I.: No such file or directory make: [generator.o] Error 1 (ignored) linking shared-object json/ext/generator.bundle make: dynamic: No such file or directory make: [generator.bundle] Error 1 (ignored) ./install -m 0755 generator.bundle ./.gem.20130930-1849-csgswk/json/ext make: ./install: No such file or directory make: *** [install-so] Error 1
我一直在搜索,但我找不到任何答案。
[更新] 查看生成Makefile,CC变量为空
CC = CXX = clang++ LIBRUBY = $(LIBRUBY_A) LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a LIBRUBYARG_SHARED = LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static empty = OUTFLAG = -o $(empty) COUTFLAG = -o $(empty(
真的很奇怪!!
答案 0 :(得分:1)
您是否为XCode安装了Comand Line Tools(XCode - >偏好设置 - >下载 - >组件标签 - > Comand Line工具 - >安装)?