CocoaPods无法使用Xcode 5.0.2进行安装

 liuyidii 发布于 2023-02-08 04:36

我已经被困在这个问题上几个小时了,我找不到解决方案.我正在运行Mavericks并安装了Xcode 5.0.2(随命令行工具一起提供).

我的环境:

使用RVM与ruby版本1.9.3p484

Xcode 5.0.2

Mac OS 10.9.1

宝石2.2.0

Bundler版本1.3.5

Sudo gem安装cocoapods输出

kyles-mbp-2:fresh-driver-ios kylechronis$ sudo gem install cocoapods
     Building native extensions.  This could take a while...
     ERROR:  Error installing cocoapods:
     ERROR: Failed to build gem native extension.

    /Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -rubygems    
    /Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/gems/rake- 0.9.2.2/bin/rake RUBYARCHDIR=/Users/kylechronis/.rvm/rubies/ruby-1.9.3- p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/xcodeproj-0.14.1 RUBYLIBDIR=/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/xcodeproj-0.14.1

   /Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb
   checking for -std=c99 option to compiler... yes
   checking for CoreFoundation... no
   checking for main() in -lCoreFoundation... no
   CoreFoundation is needed to build the Xcodeproj C extension.
    *** extconf.rb failed ***
   Could not create Makefile due to some reason, probably lack of
   necessary libraries and/or headers.  Check the mkmf.log file for more
   details.  You may need configuration options.

这是CoreFoundation无法找到的问题吗?或者使用不同版本的Ruby?任何帮助或输入将不胜感激.

1 个回答
  • 安装新的Ruby版本帮助了我.跟着这些步骤

    rvm reinstall ruby-2.0.0-p247 --with-gcc=clang --verify-downloads 1
    gem install xcodeproj
    gem install cocoapods
    

    我在一些旧的Github问题中找到了这个答案.

    2023-02-08 05:18 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有