Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 无法在mavericks上安装CoCoapod_Ruby_Xcode_Cocoapods_Rubymotion - Fatal编程技术网

Ruby 无法在mavericks上安装CoCoapod

Ruby 无法在mavericks上安装CoCoapod,ruby,xcode,cocoapods,rubymotion,Ruby,Xcode,Cocoapods,Rubymotion,我在小牛上安装gem motion Cocoapod时遇到问题。我使用的是ruby 1.9.3-p484、OSX Mavericks和Xcode 5.1 我找到了很多解决方案,但都不管用 这是我尝试安装时的错误日志 checking for -std=c99 option to compiler... yes checking for CoreFoundation... no checking for main() in -lCoreFoundation... no CoreFoundation

我在小牛上安装gem motion Cocoapod时遇到问题。我使用的是ruby 1.9.3-p484、OSX Mavericks和Xcode 5.1

我找到了很多解决方案,但都不管用

这是我尝试安装时的错误日志

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.
xcode/mkmf.log文件

运行以下命令

运行此命令


我在Mac OS 10.9、rvm 1.25.22、ruby-1.9.3-p484上也有同样的症状,当时我正试图运行gem install cocoapods;问题是我安装了gcc-4.6和gcc-4.2

当我安装ruby时,RVM显然决定为我自动运行brew安装gcc46:

$ rvm install 1.9.3-p484
Checking requirements for osx.
Error: No available formula for gcc46 
Installing requirements for osx.
Updating system....
Installing required custom packages: homebrew/versions.
Installing required packages: gcc46...
我的mkmf.log与您的类似,表明编译使用了gcc-4.6,但失败了。我的修复方法是brew卸载gcc46、rvm卸载1.9.3-p484,然后brew再次安装apple-gcc42和rvm安装1.9.3-p484


使用apple-gcc42构建的全新ruby,我的系统上没有gcc46的痕迹,gem install cocoapods工作正常。无需进行其他卸载或重新安装。

发布mkmf.log文件的相关内容如何?是否尝试了xcode select-install?我已尝试过,但出现以下错误:无法安装软件,因为软件更新服务器当前不提供该软件。。我找到了一个解决方案,并从apple开发者网站上分别下载了xcode命令行工具。我仍然得到相同的错误,我认为以下错误:'-O'的参数应该是一个非负整数,它引用了-ObjC标志。我不是gcc的极客,所以我不能做任何详细的推测。然而,我相信这是命令行工具的错误。对不起,我不能说得更具体了。
xcode-select -p
/Applications/Xcode.app/Contents/Developer
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
CFLAGS="-F /System/Library/Frameworks" gem install motion-cocoapods -- --with-ldflags="-F/System/Library/Frameworks"
$ rvm install 1.9.3-p484
Checking requirements for osx.
Error: No available formula for gcc46 
Installing requirements for osx.
Updating system....
Installing required custom packages: homebrew/versions.
Installing required packages: gcc46...