我正在尝试安装 ruby-debug-base,但在查找 Xcode 4.5.2 命令行工具的路径时似乎出现问题?
看起来该错误是由我在此处安装的命令行工具引起的: /usr/bin/xcodebuild
不在这里: /Developer/usr/bin/xcodebuild
有人遇到过这个路径问题吗?我该如何解决?我确实使用 Xcode 进行 iOS 开发,并且运行良好。
谢谢!
admin$ sudo gem install ruby-debug-base
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-base:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile
make
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c trace_nums.c
sh: /Developer/usr/bin/xcodebuild: No such file or directory
/Developer/usr/bin/xcodebuild fails with 32512 - Unknown error: 32512
make: *** [trace_nums.o] Error 69
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/linecache-0.46 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/linecache-0.46/ext/gem_make.out
最佳答案
我通过转到
中找到的“位置”选项卡解决了这个问题
Xcode > 首选项 > 下载
到达那里后,我注意到“命令行工具”的下拉框没有选择 Xcode 版本,并且下拉框旁边有一个小警报图标。
单击下拉框后,我选择了下拉列表中作为选项提供的唯一版本(4.5.2)。
然后我必须从命令行接受 Xcode 最终用户协议(protocol),然后一切都很好。
sudo xcodebuild -license
关于ruby - 安装 Ruby 调试 IDE Gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13459937/